Open xyyaya opened 5 years ago
最小复现仓库: 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'] } } })); } } 后正常
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 目录
最小复现仓库: 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'] } } })); } }
后正常