Description
When bundling with ESNext
output, classes can still get downleveled, due to an intentional performance-workaround called TDZ avoidance. This creates a consequential performance hazard when private fields end up using WeakMaps.
It looks like TDZ avoidance workaround originated in ESBuild as a response to this issue which highlighted a performance bug in Safari. That bug was fixed over two years ago and has long since rolled out to all stable versions of Safari. So it looks like Safari performance is no longer a justification for this feature.
ESBuild still has the avoidTDZ
code branches and the attached comment explains it exists due to Safari.
Is it ok to remove this feature now? Or should the comment be updated to describe some other reason?