mirror of
http://112.124.100.131/GFRS/ebiz-h5.git
synced 2025-12-16 09:56:44 +08:00
页面加载响应慢优化
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user