Harmony support #448

Closed
osener opened this Issue Mar 12, 2014 · 359 comments

Comments

Projects
None yet
@osener

osener commented Mar 12, 2014

I'm trying to use the excellent livenode with a project which uses ES6 features introduced in node v11, but unfortunately UglifyJS's parser chokes when it encounters a let statement or a generator function (function *() { yield true }).

@kevmt

This comment has been minimized.

Show comment
Hide comment
@kevmt

kevmt Apr 4, 2014

Any comment on this?

kevmt commented Apr 4, 2014

Any comment on this?

@bnjmnt4n bnjmnt4n referenced this issue May 9, 2014

Closed

Issue Overload! #480

@mgol

This comment has been minimized.

Show comment
Hide comment
@mgol

mgol Jul 17, 2014

Contributor

That would be great to have, ES6 brings a lot of important new features but minification of all of them is still needed.

Contributor

mgol commented Jul 17, 2014

That would be great to have, ES6 brings a lot of important new features but minification of all of them is still needed.

@Martii

This comment has been minimized.

Show comment
Hide comment
@Martii

Martii Nov 21, 2014

Contributor

+1

Contributor

Martii commented Nov 21, 2014

+1

@Martii Martii referenced this issue in OpenUserJS/OpenUserJS.org Nov 21, 2014

Open

Test and support new option for *express-minify* with keeping comments #432

11 of 15 tasks complete
@maranomynet

This comment has been minimized.

Show comment
Hide comment

+1

@x1ddos x1ddos referenced this issue in google/ioweb2015 Dec 22, 2014

Closed

Fix broken build (simpledb polyfill) #51

@darky

This comment has been minimized.

Show comment
Hide comment

darky commented Dec 26, 2014

👍

@ben-eb

This comment has been minimized.

Show comment
Hide comment

ben-eb commented Jan 4, 2015

+1

@kevinjalbert

This comment has been minimized.

Show comment
Hide comment
@kevinjalbert

kevinjalbert Jan 8, 2015

👍 just got bit by for...of.

👍 just got bit by for...of.

@ghost

This comment has been minimized.

Show comment
Hide comment
@ghost

ghost Jan 10, 2015

If harmony support were enabled, we could also safely convert functions that don't use this to use the => syntax as well.

ghost commented Jan 10, 2015

If harmony support were enabled, we could also safely convert functions that don't use this to use the => syntax as well.

@fabiosantoscode

This comment has been minimized.

Show comment
Hide comment
@fabiosantoscode

fabiosantoscode Jan 11, 2015

Contributor

+1 -- I'm writing a game for future browsers so I don't want to add the overhead of traceur to my code.

I also think converting functions to arrows when this is not used would be pretty nice.

Contributor

fabiosantoscode commented Jan 11, 2015

+1 -- I'm writing a game for future browsers so I don't want to add the overhead of traceur to my code.

I also think converting functions to arrows when this is not used would be pretty nice.

@fabiosantoscode

This comment has been minimized.

Show comment
Hide comment
@fabiosantoscode

fabiosantoscode Jan 11, 2015

Contributor

Adding harmony support on my fork, https://github.com/fabiosantoscode/UglifyJS2/tree/harmony little by little, to later pull request that back to this project.

Got arrow functions working so far (I think).

Contributor

fabiosantoscode commented Jan 11, 2015

Adding harmony support on my fork, https://github.com/fabiosantoscode/UglifyJS2/tree/harmony little by little, to later pull request that back to this project.

Got arrow functions working so far (I think).

@rvanvelzen

This comment has been minimized.

Show comment
Hide comment
@rvanvelzen

rvanvelzen Jan 14, 2015

Collaborator

@fabiosantoscode Awesome! It would be super cool if you could submit separate new language features as separate pull requests. That will make reviewing them a lot easier. :)

Collaborator

rvanvelzen commented Jan 14, 2015

@fabiosantoscode Awesome! It would be super cool if you could submit separate new language features as separate pull requests. That will make reviewing them a lot easier. :)

@fabiosantoscode

This comment has been minimized.

Show comment
Hide comment
@fabiosantoscode

fabiosantoscode Jan 14, 2015

Contributor

Okay, I'll restructure my commit history to do just that.

I'm writing some tests for the parser, and am thinking of doing so for the output as well, is that okay?

Contributor

fabiosantoscode commented Jan 14, 2015

Okay, I'll restructure my commit history to do just that.

I'm writing some tests for the parser, and am thinking of doing so for the output as well, is that okay?

@rvanvelzen

This comment has been minimized.

Show comment
Hide comment
@rvanvelzen

rvanvelzen Jan 14, 2015

Collaborator

That is certainly okay! Related tasks: #337, #410.

Collaborator

rvanvelzen commented Jan 14, 2015

That is certainly okay! Related tasks: #337, #410.

@steelbrain steelbrain referenced this issue in steelbrain/dQuery Jan 15, 2015

Closed

Use ES6 Loops #15

@KenanSulayman

This comment has been minimized.

Show comment
Hide comment

👍 bump.

@simonzack

This comment has been minimized.

Show comment
Hide comment

👍

@RamIdeas

This comment has been minimized.

Show comment
Hide comment

👍

@lewispham

This comment has been minimized.

Show comment
Hide comment

👍

@avdg

This comment has been minimized.

Show comment
Hide comment
@avdg

avdg Apr 27, 2015

Contributor

I hope everyone knows how to find technical information about ecmascript 6 / ecmascript 2015

Some examples:

Note: understanding the structure of the spec, instead of reading it may be more important long term, so its easy to find information about specific items of the spec.

Good luck

Contributor

avdg commented Apr 27, 2015

I hope everyone knows how to find technical information about ecmascript 6 / ecmascript 2015

Some examples:

Note: understanding the structure of the spec, instead of reading it may be more important long term, so its easy to find information about specific items of the spec.

Good luck

@niemyjski

This comment has been minimized.

Show comment
Hide comment

+1

@f0rmat1k

This comment has been minimized.

Show comment
Hide comment

👍

@f0rmat1k f0rmat1k referenced this issue in terinjokes/gulp-uglify May 11, 2015

Closed

Support for es6 modules? #102

@RevanProdigalKnight

This comment has been minimized.

Show comment
Hide comment
@dgieselaar

This comment has been minimized.

Show comment
Hide comment
@dgieselaar

dgieselaar May 15, 2015

Please, everyone, don't comment with a 👍 or a +1: they add nothing to the discussion and will only antagonize people who have expressed their interest The Right Way™: with the subscribe button.

Please, everyone, don't comment with a 👍 or a +1: they add nothing to the discussion and will only antagonize people who have expressed their interest The Right Way™: with the subscribe button.

@darky

This comment has been minimized.

Show comment
Hide comment
@darky

darky May 15, 2015

Like most clearly expressed priority of issue
You can even sort by "Most commented"

darky commented May 15, 2015

Like most clearly expressed priority of issue
You can even sort by "Most commented"

@Martii

This comment has been minimized.

Show comment
Hide comment
@Martii

Martii May 16, 2015

Contributor

@plestik
Adding a vote for support is always in the best interest of a project and is how it has been done for decades. ES6 syntax is something that this project should support to maintain high standards of quality. I am also subscribed to this thread. As you can see by the community outreach there is a strong interest and it should be taken seriously not complained about. :)

Contributor

Martii commented May 16, 2015

@plestik
Adding a vote for support is always in the best interest of a project and is how it has been done for decades. ES6 syntax is something that this project should support to maintain high standards of quality. I am also subscribed to this thread. As you can see by the community outreach there is a strong interest and it should be taken seriously not complained about. :)

@avdg

This comment has been minimized.

Show comment
Hide comment
@avdg

avdg May 16, 2015

Contributor

Maybe we should start with this question as we can all learn things from each other:

What is your favorite es6 feature?

Contributor

avdg commented May 16, 2015

Maybe we should start with this question as we can all learn things from each other:

What is your favorite es6 feature?

@avdg

This comment has been minimized.

Show comment
Hide comment
@avdg

avdg May 16, 2015

Contributor

Those who want to experiment with es6 can do it here: https://iojs.org/en/es6.html

It's basically a fork of node with many es6 features enabled by default.

Contributor

avdg commented May 16, 2015

Those who want to experiment with es6 can do it here: https://iojs.org/en/es6.html

It's basically a fork of node with many es6 features enabled by default.

@Martii

This comment has been minimized.

Show comment
Hide comment
@Martii

Martii May 17, 2015

Contributor

What is your favorite es6 feature?

Block level scoping with let statement versus var is a plus. This is the most common entry syntax for ES6.

Contributor

Martii commented May 17, 2015

What is your favorite es6 feature?

Block level scoping with let statement versus var is a plus. This is the most common entry syntax for ES6.

@RevanProdigalKnight

This comment has been minimized.

Show comment
Hide comment
@RevanProdigalKnight

RevanProdigalKnight May 17, 2015

I have to agree with @Martii; let will be a huge plus for temporary loop variables.

I have to agree with @Martii; let will be a huge plus for temporary loop variables.

@s-a s-a referenced this issue in s-a/sublime-text-refactor Jun 2, 2015

Open

ES6 Harmony support #24

josephfrazier added a commit to josephfrazier/octopermalinker that referenced this issue May 3, 2017

Don't minify JS in release build
Webpack runs uglifyjs, which doesn't
support arrow functions, etc (see mishoo/UglifyJS2#448)

This change makes it so that webpack doesn't run uglifyjs, so that the
release build works again. This actually reduces the size of the .zip
files in out/, because the source maps are currently included.

Also, this makes Travis run `npm run package-all` on each build, like
AppVeyor does, to ensure that we know if release builds fail, even if
AppVeyor doesn't run them (this happened in
https://ci.appveyor.com/project/stefanbuck/browser-extension/build/1.0.278)

---

"cherry-picked" from OctoLinker/OctoLinker@7324581

@tonyseek tonyseek referenced this issue in eleme/thrift-parser May 5, 2017

Closed

Add prepublish hook which compiles code into ES5 #9

@jhelwig jhelwig referenced this issue in big-burrito/big-burrito May 7, 2017

Merged

Setting up index and nav #12

@hearnden hearnden referenced this issue in storybooks/storybook May 9, 2017

Closed

Add option to disable Uglify. #1005

@alexlamsl

This comment has been minimized.

Show comment
Hide comment
@alexlamsl

alexlamsl May 9, 2017

Collaborator

harmony branch will now be published on https://www.npmjs.com/package/uglify-es

Closing as the scope of this issue is too broad. Please file reports on specific issues from now on, with [ES6] prefix and actionable details.

Collaborator

alexlamsl commented May 9, 2017

harmony branch will now be published on https://www.npmjs.com/package/uglify-es

Closing as the scope of this issue is too broad. Please file reports on specific issues from now on, with [ES6] prefix and actionable details.

@alexlamsl alexlamsl closed this May 9, 2017

@graingert

This comment has been minimized.

Show comment
Hide comment

@hamosapience can you deprecate https://www.npmjs.com/package/uglify-js-harmony in favour of uglify-es?

@hamosapience

This comment has been minimized.

Show comment
Hide comment

Sure:
https://www.npmjs.com/package/uglify-js-harmony.
Looks pretty deprecated now)

@graingert

This comment has been minimized.

Show comment
Hide comment
@graingert

graingert May 9, 2017

@hamosapience you want to run:

npm deprecate uglify-js-harmony "deprecated in favour of uglify-es"

@hamosapience you want to run:

npm deprecate uglify-js-harmony "deprecated in favour of uglify-es"
@mgol

This comment has been minimized.

Show comment
Hide comment
@mgol

mgol May 9, 2017

Contributor

@hamosapience you made a typo in the message; it says "depreceted" instead of "deprecated". Also, it directs people to uglify-js which is the stable version that doesn't understand ES6. It'd be better to mention uglify-es.

Contributor

mgol commented May 9, 2017

@hamosapience you made a typo in the message; it says "depreceted" instead of "deprecated". Also, it directs people to uglify-js which is the stable version that doesn't understand ES6. It'd be better to mention uglify-es.

@Martii

This comment has been minimized.

Show comment
Hide comment
@Martii

Martii May 10, 2017

Contributor

@alexlamsl

Re current README.md currently states npm install uglify-js -g which doesn't seem completely synonymous with:

harmony branch will now be published on https://www.npmjs.com/package/uglify-es

So which npmjs.com source is correct... https://www.npmjs.com/package/uglify-es or https://www.npmjs.com/package/uglify-js ?? e.g. they both point to uglify-js for npm installation... which can be confusing to newer users.

Thanks for the look.

Contributor

Martii commented May 10, 2017

@alexlamsl

Re current README.md currently states npm install uglify-js -g which doesn't seem completely synonymous with:

harmony branch will now be published on https://www.npmjs.com/package/uglify-es

So which npmjs.com source is correct... https://www.npmjs.com/package/uglify-es or https://www.npmjs.com/package/uglify-js ?? e.g. they both point to uglify-js for npm installation... which can be confusing to newer users.

Thanks for the look.

@graingert

This comment has been minimized.

Show comment
Hide comment
@graingert

graingert May 10, 2017

@Martii both are correct, uglify-es is the Harmony branch, and uglify-js is the master branch

@Martii both are correct, uglify-es is the Harmony branch, and uglify-js is the master branch

@Martii

This comment has been minimized.

Show comment
Hide comment
@Martii

Martii May 10, 2017

Contributor

@graingert
So the https://www.npmjs.com/package/uglify-es page at npmjs.com is reading the master here on GH then... since it says to install with npm install uglify-js -g e.g. it should say npm install uglify-es -g.


Should be...

... but is currently ...

Cc: @isaacs ... is there a way to have npmjs.com read the harmony branch README.md correctly? Thanks for the visit in advance.

Contributor

Martii commented May 10, 2017

@graingert
So the https://www.npmjs.com/package/uglify-es page at npmjs.com is reading the master here on GH then... since it says to install with npm install uglify-js -g e.g. it should say npm install uglify-es -g.


Should be...

... but is currently ...

Cc: @isaacs ... is there a way to have npmjs.com read the harmony branch README.md correctly? Thanks for the visit in advance.

@alexlamsl

This comment has been minimized.

Show comment
Hide comment
@alexlamsl

alexlamsl May 10, 2017

Collaborator

Documentation for uglify-es has been updated for 3.0.3, which is yet to be published on npm pending green light from Travis.

Collaborator

alexlamsl commented May 10, 2017

Documentation for uglify-es has been updated for 3.0.3, which is yet to be published on npm pending green light from Travis.

@fulls1z3 fulls1z3 referenced this issue in ng-seed/universal May 10, 2017

Closed

production build not working #11

@sbrl

This comment has been minimized.

Show comment
Hide comment
@sbrl

sbrl May 10, 2017

Suggestion: Set up Gitter for general discussion if you haven't already, and then put a link in the README to it.

sbrl commented May 10, 2017

Suggestion: Set up Gitter for general discussion if you haven't already, and then put a link in the README to it.

@abernix abernix referenced this issue in meteor/meteor May 15, 2017

Merged

Update uglifier to version 3 (uglify-es) #8698

@bbashy bbashy referenced this issue in JeffreyWay/laravel-mix May 19, 2017

Closed

UglifyJs: Unexpected token: operator (>) #790

@Polve

This comment has been minimized.

Show comment
Hide comment
@Polve

Polve May 29, 2017

I'm unable to understand how to correctly integrate uglify-es with the usual ember build pipeline: a few weeks ago I just had to add the dependency "uglify-js": "git://github.com/mishoo/UglifyJS2#harmony" but this not work any more.

I tried removing ember-cli-uglify and depending instead by ember-cli-uglify-es but this not seems to work too.

Can anyone please give me an hint?

Polve commented May 29, 2017

I'm unable to understand how to correctly integrate uglify-es with the usual ember build pipeline: a few weeks ago I just had to add the dependency "uglify-js": "git://github.com/mishoo/UglifyJS2#harmony" but this not work any more.

I tried removing ember-cli-uglify and depending instead by ember-cli-uglify-es but this not seems to work too.

Can anyone please give me an hint?

@avdg

This comment has been minimized.

Show comment
Hide comment
@avdg

avdg May 29, 2017

Contributor

Note that the api has been changed on harmony because of the breaking changes. This is done as preparation for uglifyJS v3.

Contributor

avdg commented May 29, 2017

Note that the api has been changed on harmony because of the breaking changes. This is done as preparation for uglifyJS v3.

@fritx

This comment has been minimized.

Show comment
Hide comment
@fritx

fritx May 30, 2017

@Polve if you're using webpack@1 and mishoo/UglifyJS2#harmony and have met the uglify-es problem, then you must be in the same trouble as I was.

You could try my fork of webpack and re-install, it would help.
https://github.com/fritx/webpack/tree/1.x-harmony
as mentioned here #448 (comment)

npm i -D "git+https://github.com/fritx/webpack.git#1.x-harmony"

This fork is including uglify-js < 3, and can work well.

fritx commented May 30, 2017

@Polve if you're using webpack@1 and mishoo/UglifyJS2#harmony and have met the uglify-es problem, then you must be in the same trouble as I was.

You could try my fork of webpack and re-install, it would help.
https://github.com/fritx/webpack/tree/1.x-harmony
as mentioned here #448 (comment)

npm i -D "git+https://github.com/fritx/webpack.git#1.x-harmony"

This fork is including uglify-js < 3, and can work well.

fritx referenced this issue in fritx/webpack May 30, 2017

lock uglify-js#harmony version.
uglify-js#harmony was officially renamed to uglify-es,
causing this repo not working.

fritx referenced this issue in fritx/webpack May 30, 2017

fix uglifiy-js harmony v3.0 not working
locked to harmony-lagacy branch in version 2.x

@nitin42 nitin42 referenced this issue in socraticorg/mathsteps Jun 13, 2017

Closed

Build error #166

@Polve

This comment has been minimized.

Show comment
Hide comment
@Polve

Polve Jun 13, 2017

I'm not using webpack, and I'm still stuck, unable to create a production build :-(

Polve commented Jun 13, 2017

I'm not using webpack, and I'm still stuck, unable to create a production build :-(

@kzc

This comment has been minimized.

Show comment
Hide comment
@kzc

kzc Jun 13, 2017

Contributor

I'm not a webpack user, but you could try:

https://github.com/noBlubb/uglify-es-webpack-plugin

Contributor

kzc commented Jun 13, 2017

I'm not a webpack user, but you could try:

https://github.com/noBlubb/uglify-es-webpack-plugin

@ForbesLindesay ForbesLindesay referenced this issue in facebook/create-react-app Jun 14, 2017

Merged

Switch to preset-env #1742

@tetreault

This comment has been minimized.

Show comment
Hide comment
@tetreault

tetreault Jun 17, 2017

In comparison Sputnik 1 was pretty much designed in 3 years and launched if Wikipedia isn't lying to me.

In comparison Sputnik 1 was pretty much designed in 3 years and launched if Wikipedia isn't lying to me.

@isaacs

This comment has been minimized.

Show comment
Hide comment
@isaacs

isaacs Jun 17, 2017

Hey. npm doesn't read the readme.md file from GitHub. It reads the local file at publish time. To change it, publish a new version.

isaacs commented Jun 17, 2017

Hey. npm doesn't read the readme.md file from GitHub. It reads the local file at publish time. To change it, publish a new version.

@alexlamsl

This comment has been minimized.

Show comment
Hide comment
@alexlamsl

alexlamsl Jun 17, 2017

Collaborator

@isaacs thanks for the confirmation. I believe this has been taken care of in #448 (comment)

Collaborator

alexlamsl commented Jun 17, 2017

@isaacs thanks for the confirmation. I believe this has been taken care of in #448 (comment)

@Martii

This comment has been minimized.

Show comment
Hide comment
@Martii

Martii Jun 17, 2017

Contributor

npm doesn't read the readme.md file from GitHub. It reads the local file at publish time.

That explains a bit. Thanks.

Contributor

Martii commented Jun 17, 2017

npm doesn't read the readme.md file from GitHub. It reads the local file at publish time.

That explains a bit. Thanks.

@Bagma

This comment has been minimized.

Show comment
Hide comment
@Bagma

Bagma Jun 30, 2017

Does someone know how to integrate uglify-es in grunt project?

Bagma commented Jun 30, 2017

Does someone know how to integrate uglify-es in grunt project?

@jhabdas

This comment has been minimized.

Show comment
Hide comment
@jhabdas

jhabdas Jun 30, 2017

Sounds like a great question for stack overflow

jhabdas commented Jun 30, 2017

Sounds like a great question for stack overflow

@alexlamsl

This comment has been minimized.

Show comment
Hide comment
@alexlamsl

alexlamsl Jun 30, 2017

Collaborator

@Bagma use the harmony branch of grunt-contrib-uglify:
https://github.com/gruntjs/grunt-contrib-uglify/tree/harmony

Collaborator

alexlamsl commented Jun 30, 2017

@Bagma use the harmony branch of grunt-contrib-uglify:
https://github.com/gruntjs/grunt-contrib-uglify/tree/harmony

@kzc

This comment has been minimized.

Show comment
Hide comment
@kzc

kzc Jun 30, 2017

Contributor

use the harmony branch of grunt-contrib-uglify:
https://github.com/gruntjs/grunt-contrib-uglify/tree/harmony

Is there an official grunt-contrib-uglify npm package for uglify-es?

Contributor

kzc commented Jun 30, 2017

use the harmony branch of grunt-contrib-uglify:
https://github.com/gruntjs/grunt-contrib-uglify/tree/harmony

Is there an official grunt-contrib-uglify npm package for uglify-es?

@jhabdas

This comment has been minimized.

Show comment
Hide comment

jhabdas commented Jun 30, 2017

RTFM

@kzc

This comment has been minimized.

Show comment
Hide comment
@kzc

kzc Jun 30, 2017

Contributor

@alexlamsl Since uglify-es has been released as the npm package for the uglify harmony branch, can this thread be closed to comments?

Contributor

kzc commented Jun 30, 2017

@alexlamsl Since uglify-es has been released as the npm package for the uglify harmony branch, can this thread be closed to comments?

@alexlamsl

This comment has been minimized.

Show comment
Hide comment
@alexlamsl

alexlamsl Jun 30, 2017

Collaborator

@kzc sure thing 👍

Collaborator

alexlamsl commented Jun 30, 2017

@kzc sure thing 👍

Repository owner locked and limited conversation to collaborators Jun 30, 2017

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.