mirror of
http://112.124.100.131/ebiz-ai/ebiz-ai-knowledge-manage.git
synced 2025-12-11 20:06:52 +08:00
build(prd): 优化生产环境构建配置
- 新增生产环境构建命令 build:prd - 添加 .env.prd 环境变量文件 - 更新 package.json脚本 - 调整 vue.config.js 中的输出文件命名规则 - 优化代码分割配置,增加最大代码块大小
This commit is contained in:
@@ -145,7 +145,7 @@ module.exports = {
|
||||
config.optimization.splitChunks({
|
||||
chunks: 'all',
|
||||
minSize: 3000,
|
||||
maxSize: 6000,
|
||||
maxSize: 9000,
|
||||
maxInitialRequests: 3,
|
||||
cacheGroups: {
|
||||
libs: {
|
||||
@@ -169,6 +169,10 @@ module.exports = {
|
||||
}
|
||||
})
|
||||
config.optimization.runtimeChunk('single')
|
||||
// 添加时间戳到文件名中
|
||||
})
|
||||
config.output
|
||||
.filename(`js/[name].[hash:8].js`)
|
||||
.chunkFilename(`js/[name].[hash:8].js`)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user