页面加载响应慢优化

This commit is contained in:
liu.xiaofeng@ebiz-digits.com
2023-08-01 11:50:19 +08:00
parent 891dd69a46
commit b0448eed18
36 changed files with 324 additions and 338 deletions

View File

@@ -32,14 +32,12 @@ module.exports = {
chainWebpack: config => {
// 移除 prefetch 插件
config.plugins.delete('prefetch')
// 或者
// 修改它的选项:
// config.plugin('prefetch').tap(options => {
// options[0].fileBlacklist = options[0].fileBlacklist || []
// options[0].fileBlacklist.push(/myasyncRoute(.)+?\.js$/)
// return options
// })
// 压缩代码
config.optimization.minimize(true)
// 分割代码
config.optimization.splitChunks({
chunks: 'all',
})
},
devServer: {
port: 8082