ssrwpo / uglifyjs2

Meteor package that exposes options for UglifyJS2 JS minifier
https://ssrwpo.github.io/uglifyjs2/
MIT License
14 stars 7 forks source link

Uglify fails for untranspiled ES6 NPM package #2

Closed ramezrafla closed 6 years ago

ramezrafla commented 7 years ago

The standard meteor minimizing faced the same issue: https://github.com/meteor/meteor/issues/8020#issuecomment-265758830

@abernix used the harmony (beta) version of uglify to get around this.

Note: this package is amazing -- thanks for developing it. Its features should either become standard in Meteor or this package should become key one for developers. Thanks for developing it!

ramezrafla commented 7 years ago

https://github.com/ramezrafla/uglifyjs2

I replaced the dependency minimifer-js with abernix:minififer-js and it worked (even checked resulting js for Meteor.isServer). You may not want to use a temp version of the minimifer in your main repo, and I perfectly understand.

PEM-- commented 7 years ago

Ha ha, that was my next move 😉

Indeed, I'm not sure if using the 2.7.5 release of UglifyJS would be good for all projects as it's clearly stated as an "in progress" release.

We will keep this issue open until UglifyJS finishes its work on ES6.

PEM-- commented 7 years ago

https://github.com/mishoo/UglifyJS2/issues/448#issuecomment-245936071

ramezrafla commented 7 years ago

Thanks @PEM-- Agreed, I'll leave my repo for now for those who need ES6 and will clear it once uglify pushes into production its harmony support.