Uglify SyntaxError: Unexpected token: punc ())

前端 未结 8 1000
甜味超标
甜味超标 2020-12-01 07:28

I am trying to use gulp in order to minify a folder containing JS files. However, one of the files has the above error, preventing it from being minified.

I managed

8条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-01 08:00

    If you got this error using Grunt (grunt-contrib-uglify) the solution is to install ES6 version of the plugin:

    npm install grunt-contrib-uglify-es --save-dev
    

提交回复
热议问题