vue进行wepack打包执行npm run build出现错误

在vue项目结束执行npm run build出现错误如下
vue进行wepack打包执行npm run build出现错误_第1张图片
报错点在uglifyjs-webpack-plugin于是
对比一下之前的 package.json,发现 uglifyjs-webpack-plugin 的版本是 0.4.6,但现在已经是1.1.4了。然后发现了README.md文件开头的一段话:

 webpack =< v3.0.0 currently contains v0.4.6 of this plugin under `webpack.optimize.UglifyJsPlugin as an alias. For usage of the latest version (v1.0.0), please follow the instructions below. Aliasing v1.0.0 as webpack.optimize.UglifyJsPlugin is scheduled for webpack v4.0.0
 解决办法:
     1手动改写package.json中的uglifyjs-webpack-plugin版本号将原来的1.1.4改为^0.4.6
     2 重新npm install
     3 再进行npm run build

遇到问题,小记......

你可能感兴趣的:(vue进行wepack打包执行npm run build出现错误)