some es6 features are not understood by grunt uglify js?

前端 未结 5 1653
眼角桃花
眼角桃花 2020-12-11 00:41

I used grunt-uglify in my project and I\'m working with es6. for some es6 features, such as fat arrow function, it\'s throwing an error. I think the uglify don\'t understant

5条回答
  •  不知归路
    2020-12-11 01:20

    You can use the harmony branch of grunt-contrib-uglify.

    npm install git://github.com/gruntjs/grunt-contrib-uglify.git#harmony --save-dev
    

    works perfectly with es6. No additional settings for grunt are required.

提交回复
热议问题