We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
For input,
const variable = false ;(function () { eval("var variable = true") console.log(variable) })()
esbuild outputs
const variable=!1;(function(){eval("var variable = true"),console.log(!1)})();
when minified. esbuild try
This changes the behavior of the code (true is output before minification, but false is output after minification). I guess it's because the fact that variable declarations inside direct eval leaks to the outside scope in non-strict mode is not taken into account when replacing constants.
true
false
(Note: this is not what I encountered in a real world usage. I found it when trying to know about the direct eval support in esbuild.)
The text was updated successfully, but these errors were encountered:
96d64ca
No branches or pull requests
For input,
esbuild outputs
when minified.
esbuild try
This changes the behavior of the code (
true
is output before minification, butfalse
is output after minification). I guess it's because the fact that variable declarations inside direct eval leaks to the outside scope in non-strict mode is not taken into account when replacing constants.(Note: this is not what I encountered in a real world usage. I found it when trying to know about the direct eval support in esbuild.)
The text was updated successfully, but these errors were encountered: