minapp
minapp copied to clipboard
UglifyJsPlugin 造成WXS报错
最小复现仓库: https://github.com/xyyaya/minapp-bug-demo
注释掉
dist\config\webpack.config.js
中的
if (mode === 'production') { if (!env_1.env.pretty) { var UglifyJsPlugin = require('uglifyjs-webpack-plugin'); minimizer.push(new UglifyJsPlugin({ cache: true, parallel: true, sourceMap: sourceMap, uglifyOptions: { mangle: { reserved: ['module', 'exports', 'global'] } } })); } }
后正常
复现方法: npm run build 后使用微信开发工具打开 dist 目录