UglifyJS icon indicating copy to clipboard operation
UglifyJS copied to clipboard

Harmony support

Open ozanvos opened this issue 12 years ago • 359 comments

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 }).

ozanvos avatar Mar 12 '14 17:03 ozanvos

Any comment on this?

kevyworks avatar Apr 04 '14 14:04 kevyworks

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

mgol avatar Jul 17 '14 08:07 mgol

+1

Martii avatar Nov 21 '14 05:11 Martii

+1

maranomynet avatar Dec 11 '14 10:12 maranomynet

:+1:

darky avatar Dec 26 '14 11:12 darky

+1

ben-eb avatar Jan 04 '15 10:01 ben-eb

:+1: just got bit by for...of.

kevinjalbert avatar Jan 08 '15 18:01 kevinjalbert

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

ghost avatar Jan 10 '15 18:01 ghost

+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 avatar Jan 11 '15 16:01 fabiosantoscode

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).

fabiosantoscode avatar Jan 11 '15 20:01 fabiosantoscode

@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. :)

rvanvelzen avatar Jan 14 '15 12:01 rvanvelzen

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?

fabiosantoscode avatar Jan 14 '15 14:01 fabiosantoscode

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

rvanvelzen avatar Jan 14 '15 14:01 rvanvelzen

:+1: bump.

19h avatar Feb 08 '15 00:02 19h

:+1:

simonzack avatar Mar 05 '15 22:03 simonzack

:+1:

RamIdeas avatar Apr 26 '15 15:04 RamIdeas

:+1:

lewispham avatar Apr 26 '15 16:04 lewispham

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

Some examples:

  • Candidate specs: http://wiki.ecmascript.org/doku.php?id=harmony:specification_drafts
  • Es discuss: https://esdiscuss.org/

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

avdg avatar Apr 27 '15 16:04 avdg

+1

niemyjski avatar Apr 30 '15 22:04 niemyjski

:+1:

f0rmat1k avatar May 11 '15 10:05 f0rmat1k