File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -50,7 +50,16 @@ module.exports = {
5050 } ,
5151 chainWebpack ( config ) {
5252 // 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+ ] )
5463
5564 // when there are many pages, it will cause too many meaningless requests
5665 config . plugins . delete ( 'prefetch' )
@@ -118,6 +127,7 @@ module.exports = {
118127 }
119128 }
120129 } )
130+ // https:// webpack.js.org/configuration/optimization/#optimizationruntimechunk
121131 config . optimization . runtimeChunk ( 'single' )
122132 }
123133 )
You can’t perform that action at this time.
0 commit comments