How to minify ES6 functions with gulp-uglify?

后端 未结 8 1189
时光说笑
时光说笑 2020-12-23 11:23

When I run gulp I get the following error:

[12:54:14] { [GulpUglifyError: unable to minify JavaScript]
cause:
{ [SyntaxError: Unexpected token: operator (>         


        
8条回答
  •  遥遥无期
    2020-12-23 12:13

    unfortunately, as per now, you can't use uglify with es-next code, you can:

    1. Transpile to ES5using Babel
    2. Use Babili instead of Uglify.

提交回复
热议问题