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

Is Harmony still considered experimental? #142

Open
blovato opened this issue Jul 11, 2018 · 7 comments
Open

Is Harmony still considered experimental? #142

blovato opened this issue Jul 11, 2018 · 7 comments

Comments

@blovato
Copy link

blovato commented Jul 11, 2018

Hello,

We are using Uglifier in a large production application and are running into es6 issues (similar to #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!

@lautis
Copy link
Owner

lautis commented Jul 13, 2018

Yes. In fact, the development of the Harmony version of UglifyJS has stopped. Harmony support might need to be removed at some point.

mishoo/UglifyJS#3010 (comment)

@lautis
Copy link
Owner

lautis commented Jul 13, 2018

It could be worth checking out if terser could be used instead of the unmaintained uglify-es for ES6 support.

@blovato
Copy link
Author

blovato commented Jul 16, 2018

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 👍

@pravi
Copy link

pravi commented Sep 13, 2020

@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. webpack/webpack#8036

@pravi
Copy link

pravi commented Sep 13, 2020

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

@lautis
Copy link
Owner

lautis commented Sep 13, 2020

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.

@Masa331
Copy link

Masa331 commented Sep 26, 2020

There is also a gem which already wraps Terser - https://github.com/ahorek/terser-ruby and is compatible with Sprockets

mysociety-pusher pushed a commit to mysociety/alaveteli that referenced this issue Dec 9, 2020
4d2ab5a introduces ES6 syntax, which Uglifier doesn't support by
default [1].

This commit enables the experimental "Harmony mode", along with
disabling `mangle` and `compress` as per the usage recommendations [2].

This doesn't seem like a good long-term solution, since development of
Harmony mode has stopped and may be removed. This at least allows us to
deploy 4d2ab5a for now.

Fixes #6008.

[1] https://github.com/lautis/uglifier#es6--es2015--harmony-mode
[2] https://github.com/lautis/uglifier#usage
[3] lautis/uglifier#142 (comment)
gbp pushed a commit to mysociety/alaveteli that referenced this issue Feb 16, 2021
4d2ab5a introduces ES6 syntax, which Uglifier doesn't support by
default [1].

This commit enables the experimental "Harmony mode", along with
disabling `mangle` and `compress` as per the usage recommendations [2].

This doesn't seem like a good long-term solution, since development of
Harmony mode has stopped and may be removed. This at least allows us to
deploy 4d2ab5a for now.

Fixes #6008.

[1] https://github.com/lautis/uglifier#es6--es2015--harmony-mode
[2] https://github.com/lautis/uglifier#usage
[3] lautis/uglifier#142 (comment)
gbp pushed a commit to mysociety/alaveteli that referenced this issue Feb 22, 2021
4d2ab5a introduces ES6 syntax, which Uglifier doesn't support by
default [1].

This commit enables the experimental "Harmony mode", along with
disabling `mangle` and `compress` as per the usage recommendations [2].

This doesn't seem like a good long-term solution, since development of
Harmony mode has stopped and may be removed. This at least allows us to
deploy 4d2ab5a for now.

Fixes #6008.

[1] https://github.com/lautis/uglifier#es6--es2015--harmony-mode
[2] https://github.com/lautis/uglifier#usage
[3] lautis/uglifier#142 (comment)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants