perf: 打包优化

This commit is contained in:
chenjinsong
2021-08-30 17:40:56 +08:00
parent a6e30d5c08
commit 751560d4ad
2 changed files with 2 additions and 13 deletions

View File

@@ -76,18 +76,7 @@ const plugins = [
sourceMap: config.build.productionSourceMap, sourceMap: config.build.productionSourceMap,
parallel: true parallel: true
}), }),
new BundleAnalyzerPlugin({ new BundleAnalyzerPlugin()
analyzerMode: 'server',
analyzerHost: '127.0.0.1',
analyzerPort: 8889,
reportFilename: 'report.html',
defaultSizes: 'parsed',
openAnalyzer: true,
generateStatsFile: false,
statsFilename: 'stats.json',
statsOptions: null,
logLevel: 'info'
})
] ]
module.exports = config module.exports = config

View File

@@ -4,7 +4,7 @@
"private": true, "private": true,
"scripts": { "scripts": {
"serve": "vue-cli-service serve", "serve": "vue-cli-service serve",
"build": "vue-cli-service build", "build": "cross-env NODE_ENV=production vue-cli-service build",
"lint": "vue-cli-service lint", "lint": "vue-cli-service lint",
"analyz": "cross-env NODE_ENV=production npm_config_report=true npm run build" "analyz": "cross-env NODE_ENV=production npm_config_report=true npm run build"
}, },