@@ -39,6 +39,7 @@ module.exports = {
39
39
rel : 'preload' ,
40
40
include : 'initial' ,
41
41
fileWhitelist : [
42
+ / ( ^ @ v u e ) ( .* ) ( \. j s $ ) / ,
42
43
/ ( ^ v u e ) ( .* ) ( \. j s $ ) /
43
44
] ,
44
45
// do not preload map files or hot update files
@@ -54,7 +55,7 @@ module.exports = {
54
55
cacheGroups : {
55
56
// Vue modules
56
57
vue : {
57
- test : / [ \\ / ] n o d e _ m o d u l e s [ \\ / ] v u e .* [ \\ / ] / ,
58
+ test : / [ \\ / ] n o d e _ m o d u l e s [ \\ / ] ( @ v u e .* | v u e . * ) [ \\ / ] / ,
58
59
name : 'vue' ,
59
60
enforce : true ,
60
61
priority : 20 ,
@@ -68,8 +69,9 @@ module.exports = {
68
69
// Note the usage of `path.sep` instead of / or \, for cross-platform compatibility.
69
70
const path = require ( 'path' )
70
71
return module . resource &&
71
- ! module . resource . includes ( `${ path . sep } node_modules${ path . sep } vue` ) &&
72
- ! module . resource . includes ( `${ path . sep } src${ path . sep } ` )
72
+ ! module . resource . includes ( `${ path . sep } node_modules${ path . sep } @vue` ) &&
73
+ ! module . resource . includes ( `${ path . sep } node_modules${ path . sep } vue` ) &&
74
+ ! module . resource . includes ( `${ path . sep } src${ path . sep } ` )
73
75
} ,
74
76
maxSize : 500000 ,
75
77
priority : 10 ,
@@ -87,8 +89,8 @@ module.exports = {
87
89
}
88
90
} )
89
91
90
- // Webpack includes a small piece of runtime code that gets inserted into the last bundle created. This could cause our vendor
91
- // bundle to change unnecessarily. So the next line causes this runtime to be put in a separate file.
92
+ // Webpack includes a small piece of runtime code that gets inserted into the last chunk created. This could cause our vendor
93
+ // chunk to change unnecessarily. So the next line causes this runtime to be put in a separate file.
92
94
config . optimization . set ( 'runtimeChunk' , true )
93
95
}
94
96
0 commit comments