How to solve this minification error on Gulp?

前端 未结 2 1994
既然无缘
既然无缘 2020-12-05 13:42

I\'m getting below error running this command

gulp.task(\'minify\', function () {
    return gulp
      .src(\'public/app/js/myapp.bundle.js\')
      .pipe(u         


        
2条回答
  •  自闭症患者
    2020-12-05 14:08

    If you run into this problem and you have in fact a transpiler step like Babel, make sure that you include the proper Babel preset in you .babelrc file. Otherwise Babel will simply leave your code as is.

    E.g.

    {
      "presets": ["es2015"]
    }
    

提交回复
热议问题