You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note: TypeScript silently shipped a breaking change in version 4.3.2 where if the useDefineForClassFields option is not specified, it defaults to true if you specify target: "ESNext" (and later on also target: "ES2022" or newer). Before version 4.3.2, the useDefineForClassFields option always defaulted to false. The latest version of esbuild has been updated to reflect the behavior of TypeScript version 4.3.2. If you need the old behavior, make sure to specify useDefineForClassFields: false in addition to target: "ESNext". See TypeScript PR #42663 for more information.
I agree that this behavior is unfortunate and confusing. But I believe esbuild's behavior should match the behavior of the TypeScript compiler here, so in that sense esbuild is "working as intended" because that's how the TypeScript team has decided it should work. The only way to know for sure whether this is a bug with esbuild or not would be for you to provide a self-contained way to reproduce the issue, which was not provided here.
See https://gist.github.com/jpzwarte/f0a698c0dc15f2242128d27a13a47d2d and notice line 50 in the
es2022.log
which is causing the bug.Similar to #2629
This happens with >= 0.16.
The text was updated successfully, but these errors were encountered: