esbuild 0.18.11
-
Fix a TypeScript code generation edge case (#3199)
This release fixes a regression in version 0.18.4 where using a TypeScript
namespacethat exports aclassdeclaration combined with--keep-namesand a--targetofes2021or earlier could cause esbuild to export the class from the namespace using an incorrect name (notice the assignment toX2._Yvs.X2.Y):// Original code // Old output (with --keep-names --target=es2021) var X; ((X2) => { const _Y = class _Y { }; __name(_Y, "Y"); let Y = _Y; X2._Y = _Y; })(X || (X = {})); // New output (with --keep-names --target=es2021) var X; ((X2) => { const _Y = class _Y { }; __name(_Y, "Y"); let Y = _Y; X2.Y = _Y; })(X || (X = {}));