正常运行的部分代码:const UglifyJSPlugin = require('uglifyjs-webpack-plugin');plugins: [ new UglifyJSPlugin()]但是我一但给UglifyJSPlugin添加配置信息,运行就会报错,比如:plugins: [ new UglifyJSPlugin({ warnings: false })]无论填什么都报错,不知道哪儿出问题了,求大神指点。报错信息:npm ERR! code ELIFECYCLEnpm ERR! errno 1npm ERR! webpack02@1.0.0 pack: `webpack`npm ERR! Exit status 1npm ERR!npm ERR! Failed at the webpack02@1.0.0 pack script.npm ERR! This is probably not a problem with npm. There is likely additional logging output above.npm ERR! A complete log of this run can be found in:npm ERR! e:\tools\Roaming\npm-cache\_logs\2017-11-21T03_11_35_179Z-debug.log
2 回答
墨色风雨
TA贡献1853条经验 获得超6个赞
npm uninstall webpack --save-dev
npm install webpack@3.6.0 --save-dev
我是使用3.6的版本解决了
添加回答
举报
0/150
提交
取消