美国uat环境配置修改,使用gzip压缩
parent
b6ffcd3d6b
commit
ef4d6420f3
2
.env.usa
2
.env.usa
|
@ -2,7 +2,7 @@
|
|||
ENV = 'usa'
|
||||
NODE_ENV = 'usa'
|
||||
# base public path
|
||||
VUE_APP_BASE_PATH = 'https://ei-med-s3-uat-code.s3.amazonaws.com/2025-01-24/'
|
||||
VUE_APP_BASE_PATH = 'https://d3taa4kz0xxv95.cloudfront.net/2025-01-23/'
|
||||
|
||||
# 是否开启登陆限制 true:是 false:否
|
||||
VUE_APP_LOGIN_FOR_PERMISSION = true
|
||||
|
|
|
@ -159,28 +159,28 @@ module.exports = {
|
|||
config.plugins.delete('preload') // TODO: need test
|
||||
config.plugins.delete('prefetch') // TODO: need test
|
||||
// set svg-sprite-loader
|
||||
// config.optimization.splitChunks({
|
||||
// chunks: "initial", //async异步代码分割 initial同步代码分割 all同步异步分割都开启
|
||||
// minSize: 30000, //字节 引入的文件大于30kb才进行分割
|
||||
// //maxSize: 50000, //50kb,尝试将大于50kb的文件拆分成n个50kb的文件
|
||||
// minChunks: 1, //模块至少使用次数
|
||||
// maxAsyncRequests: 5, //同时加载的模块数量最多是5个,只分割出同时引入的前5个文件
|
||||
// maxInitialRequests: 3, //首页加载的时候引入的文件最多3个
|
||||
// automaticNameDelimiter: '~', //缓存组和生成文件名称之间的连接符
|
||||
// name: true, //缓存组里面的filename生效,覆盖默认命名
|
||||
// cacheGroups: { //缓存组,将所有加载模块放在缓存里面一起分割打包
|
||||
// vendors: { //自定义打包模块
|
||||
// test: /[\\/]node_modules[\\/]/,
|
||||
// priority: -10, //优先级,先打包到哪个组里面,值越大,优先级越高
|
||||
// filename: 'vendors.js',
|
||||
// },
|
||||
// default: { //默认打包模块
|
||||
// priority: -20,
|
||||
// reuseExistingChunk: true, //模块嵌套引入时,判断是否复用已经被打包的模块
|
||||
// filename: 'common.js'
|
||||
// }
|
||||
// }
|
||||
// })
|
||||
config.optimization.splitChunks({
|
||||
chunks: "initial", //async异步代码分割 initial同步代码分割 all同步异步分割都开启
|
||||
minSize: 30000, //字节 引入的文件大于30kb才进行分割
|
||||
maxSize: 5000000, //50kb,尝试将大于50kb的文件拆分成n个50kb的文件
|
||||
minChunks: 1, //模块至少使用次数
|
||||
maxAsyncRequests: 30, //同时加载的模块数量最多是5个,只分割出同时引入的前5个文件
|
||||
maxInitialRequests: 30, //首页加载的时候引入的文件最多3个
|
||||
automaticNameDelimiter: '_', //缓存组和生成文件名称之间的连接符
|
||||
name: true, //缓存组里面的filename生效,覆盖默认命名
|
||||
cacheGroups: { //缓存组,将所有加载模块放在缓存里面一起分割打包
|
||||
vendors: { //自定义打包模块
|
||||
test: /[\\/]node_modules[\\/]/,
|
||||
priority: -10, //优先级,先打包到哪个组里面,值越大,优先级越高
|
||||
filename: 'vendors.js',
|
||||
},
|
||||
default: { //默认打包模块
|
||||
priority: -20,
|
||||
reuseExistingChunk: true, //模块嵌套引入时,判断是否复用已经被打包的模块
|
||||
filename: 'common.js'
|
||||
}
|
||||
}
|
||||
})
|
||||
config.module
|
||||
.rule('svg')
|
||||
.exclude.add(resolve('src/icons'))
|
||||
|
|
Loading…
Reference in New Issue