ERROR in static/js/xxx.js from UglifyJs Unexpected token name «currentVersion»

添加链接描述

ERROR in static/js/xxx.js from UglifyJs
Unexpected token name «currentVersion», expected punc

	遇到这种异常, 需要运行下面脚本
	运行npm i -D uglifyjs-webpack-plugin@beta
	修改webpack.prod.conf.js
	
	js中引入参数
	const UglifyJsPlugin = require('uglifyjs-webpack-plugin')

	再将原来的
	 new webpack.optimize.UglifyJsPlugin ({
	      compress: {
	        warnings: false
	      },
	      sourceMap: config.build.productionSourceMap,
	      parallel: true
	    }), 
	改成
	new UglifyJsPlugin(),

你可能感兴趣的:(vue,javascript,开发语言,ecmascript)