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? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
var test = function(x) { if (x == 1 ) { return "a" } else { return "b" } return null; } test(1)
esbuild a.js --minify
var test=function(r){if(r==1)return"a";return"b";return null};test(1);
esbuild a.js --minify --bundle
(()=>{var e=function(r){if(r==1)return"a";return"b";return null};e(1);})();
In both cases, --minify should remove the final return null because it is unreachable.
The text was updated successfully, but these errors were encountered:
Huh, yeah that looks like a bug. Seems like it'll be easy to fix.
Sorry, something went wrong.
d7eb896
The next release will generate this code:
var test=function(r){return r==1?"a":"b"};test(1);
Wow amazingly quick fix. Will this work without bundle as well? I don't use --bundle in my app.
Yeah this shouldn’t depend on the bundle setting.
Successfully merging a pull request may close this issue.
esbuild a.js --minify
esbuild a.js --minify --bundle
In both cases, --minify should remove the final return null because it is unreachable.
The text was updated successfully, but these errors were encountered: