-
Notifications
You must be signed in to change notification settings - Fork 357
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
Research a replacement for uglifier's harmony mode for uglifying es6 - terser appears to be the suggested alternative #9246
Comments
Another option is to drop uglifier entirely and leave it uncompressed. Or, after that it might possible to use a webpack plugin to do the js compression. We should also research if Apache has anything for us. |
mod_deflate might be an option: https://httpd.apache.org/docs/current/mod/mod_deflate.html |
So there's gzip compression, and then there's uglify-js style compression...we can possibly do both. I was doing a quick plugin search, and stumbled on https://stackoverflow.com/questions/65298689/uglifyjs-and-webpack-v5, which basically says that the ugjlify-js webpack plugin only works with webpack 4, but on webpack 5 there's a terser plugin instead. I'm wondering if we can just use it directly in our webpack config and then we don't need any Rails-side js compression. https://github.com/webpack-contrib/terser-webpack-plugin |
From #9245
FYI, it looks like uglifier's harmony path going forward is in doubt: https://www.github.com/lautis/uglifier/issues/193:
They're suggesting we move to terser in the future.
There was a comment here describing how to check all your assets to see which ones are failing to load with uglifier due to this es6 problem. https://www.github.com/lautis/uglifier/issues/127#issuecomment-483313583
The text was updated successfully, but these errors were encountered: