Harmony support
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 }).
Any comment on this?
That would be great to have, ES6 brings a lot of important new features but minification of all of them is still needed.
+1
+1
:+1:
+1
:+1: just got bit by for...of.
If harmony support were enabled, we could also safely convert functions that don't use this to use the => syntax as well.
+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.
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 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. :)
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?
That is certainly okay! Related tasks: #337, #410.
:+1: bump.
:+1:
:+1:
:+1:
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
+1
:+1: