You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The harmony project in UglifyJS has been without updates for a long time.
Can you warn to use terser when compiling with the harmony option set to true?
They're suggesting we move to terser in the future.
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.
jrafanie
changed the title
Research a replacement for uglifier / harmony for uglifying es6 - terser appears to be the suggested alternative
Research a replacement for uglifier's harmony mode for uglifying es6 - terser appears to be the suggested alternative
Aug 14, 2024
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.
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: