-
-
Notifications
You must be signed in to change notification settings - Fork 224
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.
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
JS minify produces broken code #445
Comments
This bug has been confirmed, working on a fix! |
Still working on the fix, it is quite complex as it requires some restructuring of the code. I use the opportunity to push through related improvements for minification. |
The shortest output should be a=1;function f(){return 1}var{min,max}=Math,a;function g(){return 2} |
I've pushed out a fix for your issue, and besides fixing a bug most benchmark targets get smaller still (improved minification). Unfortunately this comes at a 2% cost in time. Only complex (array or object) variable declarations don't get merged yet. Hopefully that gets fixed as soon as it is supported. In the meanwhile, if you can please test the patch to see if your JS still runs as expected. |
Input
Output
Reference (https://jscompress.com)
This is not a new issue. I tested 2.9.10 - 2.9.22. Only 2.9.21 was different (very different).
The text was updated successfully, but these errors were encountered: