We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 73864c5 + 7d22024 commit 9efcc18Copy full SHA for 9efcc18
packages/dotcom-build-code-splitting/src/index.ts
@@ -19,7 +19,17 @@ export class PageKitCodeSplittingPlugin {
19
},
20
splitChunks: {
21
chunks: 'all',
22
- name: compiler.options.mode === 'development' ? 'vendors' : false
+ cacheGroups: {
23
+ defaultVendors: {
24
+ // output a stable name for the defaultVendors chunk in development for testing purposes
25
+ name: compiler.options.mode === 'development' ? 'vendors' : false,
26
+ // setting the config here skips Webpack's defaults, so add them back
27
+ idHint: 'vendors',
28
+ reuseExistingChunk: true,
29
+ test: /[\\/]node_modules[\\/]/i,
30
+ priority: -10
31
+ }
32
33
}
34
35
0 commit comments