webpack 打包压缩 ES6文件报错UglifyJs + Unexpected token punc (();  或者 Unexpected token: operator (>) 

解决方案就是将babel配置转义到 .babelrc 文件中。具体做法是在根目录新建 .babel,输入

{
    "presets": ["es2015"]
}

在webpack加载babel-loader的时候会自动加载.babelrc配置的。

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-10-17
  • 2022-12-23
  • 2021-10-26
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-02-16
  • 2022-12-23
  • 2022-12-23
  • 2021-08-19
相关资源
相似解决方案