Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
HenryTSZ opened this issue Jul 20, 2023 · 0 comments

Comments

@HenryTSZ
Copy link
Owner

HenryTSZ commented Jul 20, 2023

https://blog.csdn.net/Java_user_user/article/details/125616471

我老婆小阿婷
已于 2022-07-13 11:42:42 修改
1295
收藏 3

于 2022-07-05 11:35:07 首次发布

版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。

Unexpected token name «currentVersion», expected punc

	遇到这种异常, 需要运行下面脚本
	运行npm i -D uglifyjs-webpack-plugin@beta
	修改webpack.prod.conf.js
	
	将原来的
	 new webpack.optimize.UglifyJsPlugin ({
	      compress: {
	        warnings: false
	      },
	      sourceMap: config.build.productionSourceMap,
	      parallel: true
	    }), 
	改成
	const UglifyJsPlugin = require('uglifyjs-webpack-plugin')
	new UglifyJsPlugin(),

问题解决!

@HenryTSZ HenryTSZ changed the title ERROR in static/js/xxx.js from UglifyJs Unexpected token name «currentVersion»_我老婆小阿婷的博客-CSDN博客 ERROR in static/js/xxx.js from UglifyJs Unexpected token name «currentVersion» Aug 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant