vue.config.js的uglifyjs-webpack-plugin
static/js/chunk-vendors.004474e2.js from UglifyJs
Unexpected token: operator «>» [static/js/chunk-vendors.004474e2.js:14722,27]
项目环境是vuejs3加上antd,尝试compression-webpack-plugin和uglifyjs-webpack-plugin打包插件,
发现uglifyjs-webpack-plugin一使用这个方法就报错,配置对象时报其他的错误如下:
Building for production...events.js:292
throw er; // Unhandled 'error' even
查看网上解决方案,安装uglifyjs-webpack-plugin@beta支持对 ES2015+ 语法。
本作品采用《CC 协议》,转载必须注明作者和本文链接
推荐文章: