Open blovato opened 6 years ago
Yes. In fact, the development of the Harmony version of UglifyJS has stopped. Harmony support might need to be removed at some point.
https://github.com/mishoo/UglifyJS2/issues/3010#issuecomment-374147334
It could be worth checking out if terser could be used instead of the unmaintained uglify-es for ES6 support.
Ah this is very good to know; thanks for the reply! Just fyi, we ended up transpiling with browserify and babelify before uglification to solve this issue without depending on the harmony flag :+1:
@lautis can we switch to terser as default ? terser is well maintained and can replace both uglify.js and uglify-harmony.js and many projects like webpack already switched to terser by default. https://github.com/webpack/webpack/pull/8036
With my limited programming knowledge (I'm a package maintainer/system administrator), I managed to switch uglify-harmony.js with terser.js. Here is the proof of concept patch https://salsa.debian.org/ruby-team/ruby-uglifier/-/blob/master/debian/patches/005-use-terser.patch
I'd be happy to replace UglifyJS with Terser. The number of differences is big enough that it'd make sense to release new version as a breaking change with regards to options.
There's also terser branch in this repository.
There is also a gem which already wraps Terser - https://github.com/ahorek/terser-ruby and is compatible with Sprockets
Hello,
We are using Uglifier in a large production application and are running into es6 issues (similar to https://github.com/lautis/uglifier/issues/127) that are solved by using harmony. We are hesitant to adopt experimental technology though and are curious why harmony is labeled as experimental and what is remaining or planned to do to take it out of that state. Any information would be very helpful!
Thanks!