building for production...[ Error: static/js/0.e5262afb6d92aae69c76.js from UglifyJs
`warnings` is not a supported option
at Function.buildError (/mypath/node_modules/_uglifyjs-webpack-plugin@2.0.1@uglifyjs-webpack-plugin/dist/index.js:114:12)
at results.forEach (/mypath/node_modules/_uglifyjs-webpack-plugin@2.0.1@uglifyjs-webpack-plugin/dist/index.js:255:52)
at Array.forEach (<anonymous>)
at taskRunner.run (/mypath/node_modules/_uglifyjs-webpack-plugin@2.0.1@uglifyjs-webpack-plugin/dist/index.js:242:17)
at step (/mypath/node_modules/_uglifyjs-webpack-plugin@2.0.1@uglifyjs-webpack-plugin/dist/TaskRunner.js:76:9)
at done (/mypath/node_modules/_uglifyjs-webpack-plugin@2.0.1@uglifyjs-webpack-plugin/dist/TaskRunner.js:84:30)
at boundWorkers (/mypath/node_modules/_uglifyjs-webpack-plugin@2.0.1@uglifyjs-webpack-plugin/dist/TaskRunner.js:89:13)
at /mypath/node_modules/_worker-farm@1.7.0@worker-farm/lib/farm.js:199:19
at process._tickCallback (internal/process/next_tick.js:61:11),
Error: static/js/1.89c4c336d047e363641c.js from UglifyJs
Run Code Online (Sandbox Code Playgroud)
当出现此错误npm run build的今天,
一切都4天前正确。
今天,当我更新本地的node_modules时,它就发生了。
我认为应该是某包前几天发布的新版本
任何帮助,将不胜感激!
更新
此错误是由上一版本uglify-js@3.5.10引起的,warnings在选项中删除可暂时修复此错误。
uglifyOptions: {
compress: {
warnings: false,
pure_funcs: ['console.log']
}
}
Run Code Online (Sandbox Code Playgroud)
Ian*_*ong 15
它是由Uglify-js的升级引起的,详情请参见:https : //github.com/mishoo/UglifyJS2/issues/3394
解决方案是:
使用:
{
"warnings": value
}
Run Code Online (Sandbox Code Playgroud)
代替:
{
"compress": {
"warnings": value
}
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
3023 次 |
| 最近记录: |