perf: 打包优化
This commit is contained in:
@@ -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
|
||||||
|
|||||||
@@ -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"
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user