File tree 1 file changed +11
-1
lines changed
1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -50,7 +50,16 @@ module.exports = {
50
50
} ,
51
51
chainWebpack ( config ) {
52
52
// it can improve the speed of the first screen, it is recommended to turn on preload
53
- // config.plugins.delete('preload')
53
+ // it can improve the speed of the first screen, it is recommended to turn on preload
54
+ config . plugin ( 'preload' ) . tap ( ( ) => [
55
+ {
56
+ rel : 'preload' ,
57
+ // to ignore runtime.js
58
+ // https://github.com/vuejs/vue-cli/blob/dev/packages/@vue/cli-service/lib/config/app.js#L171
59
+ fileBlacklist : [ / \. m a p $ / , / h o t - u p d a t e \. j s $ / , / r u n t i m e \. .* \. j s $ / ] ,
60
+ include : 'initial'
61
+ }
62
+ ] )
54
63
55
64
// when there are many pages, it will cause too many meaningless requests
56
65
config . plugins . delete ( 'prefetch' )
@@ -118,6 +127,7 @@ module.exports = {
118
127
}
119
128
}
120
129
} )
130
+ // https:// webpack.js.org/configuration/optimization/#optimizationruntimechunk
121
131
config . optimization . runtimeChunk ( 'single' )
122
132
}
123
133
)
You can’t perform that action at this time.
0 commit comments