Skip to content
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

Use more robust minifer than JSMin (with a real parser) #19

Closed
westonruter opened this issue Aug 21, 2013 · 1 comment
Closed

Use more robust minifer than JSMin (with a real parser) #19

westonruter opened this issue Aug 21, 2013 · 1 comment

Comments

@westonruter
Copy link
Contributor

BeHeard reported an issue on the WP forums, whereby dependency minification was failing on one or more scripts. The specific error was (see screenshot at end of description):

JSMin: Unterminated RegExp at byte 230500: /g,"%2D%2D")+ Try again

It looks like a bug in JSMin, cause by the fact that it is not use a real parser: https://code.google.com/p/minify/issues/detail?id=222

So we should by default use JSMinPlus, and then fallback to JSMin, and if that does not work, throw the error described in #18. Note that I had defailed to JSMin since JSMinPlus was also failing to minify some script I was using during testing. We could use Google's Closure Compiler, but then we have to break up the code into chunks since Google imposes a limit on the POST size.

@westonruter
Copy link
Contributor Author

Duplicate of #7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant