标签:hold expect 文件 javascrip 安装 ref html loader webp
webpack打包压缩 ES6 js react报错:
升级到 babel6 了
ERROR in /Scripts/Test/test.bundle.js from UglifyJs
Unexpected token punc ?(?, expected punc ?:? [/Scripts/Test/test.bundle.js:22901,
解决方案:
安装 babel-preset-es2015
npm install babel-preset-es2015 --save
配置babel
//加载器配置 loaders: [ { test: /\.jsx$/, loader: ‘babel-loader‘, query: { presets: [‘react‘, ‘es2015‘] } }
参考链接:webpack 打包压缩 ES6文件报错
webpack 打包压缩 ES6文件报错UglifyJs + Unexpected token punc «(», expected punc «:»
标签:hold expect 文件 javascrip 安装 ref html loader webp
原文地址:http://www.cnblogs.com/ekse/p/6814239.html