Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to integrate uglify-es in grunt?

I'm using gruntjs (which uses uglifyjs) to build my Angularjs app. But uglifyjs still does not support es6, so in corresponding GitHub issue i found this. So now there is uglify-es, which seemingly supports es6. But I'm not sure how to integrate it with grunt. Now i have module "grunt-contrib-uglify", which has a dependency uglifyjs, which is now used. How can i make grunt use uglify-es instead?

like image 332
Yevhenii Bahmutskyi Avatar asked Jun 30 '17 13:06

Yevhenii Bahmutskyi


1 Answers

I've achived this by installing the harmony branch of grunt-contrib-uglify, which supports es6:

npm install git://github.com/gruntjs/grunt-contrib-uglify.git#harmony --save-dev
like image 112
Yevhenii Bahmutskyi Avatar answered Oct 18 '22 06:10

Yevhenii Bahmutskyi