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
When lowering optional chaining / nullish coalescing operator, the temporary variable declaration comes before "use strict" making the function to be non-strict mode
#3322
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
When lowering optional chaining / nullish coalescing operator, the temporary variable declaration gets inject at the top of the function. Then, "use strict" becomes the non-first statement and that function becomes non-strict (sloppy) mode.
When lowering optional chaining / nullish coalescing operator, the temporary variable declaration gets inject at the top of the function. Then,
"use strict"
becomes the non-first statement and that function becomes non-strict (sloppy) mode.Input:
Options:
--target es2015
Actual output:
Expected output:
esbuild try
This bug seems to exist since at least 0.5.1.
related: vitejs/vite#14094
The text was updated successfully, but these errors were encountered: