webpack 打包压缩 ES6文件报错UglifyJs + Unexpected token punc «(», expected punc «:»

 webpack打包压缩 ES6 js、.vue报错:

ERROR in js/test.js from UglifyJs
Unexpected token punc ?(?, expected punc ?:? [js/test.js:1374,5]
解决方案:

配置babel,把配置放到文件【.babelrc】中
{
  "presets": ["es2015"]
}

 

文章来自:http://www.cnblogs.com/xueshanshan/p/6610940.html
© 2021 jiaocheng.bubufx.com  联系我们
ICP备案:鲁ICP备09046678号-3