a17ace8eba
Adding a conformance plugin the make sure users don't undo the benefits of the granularChunks config. The plugin makes sure that minSize, maxInitialRequests values aren't overridden. Also ensures the cacheGroups - vendors, framework, libs, common, shared are maintained. The warning and error messages do not break the build with this change. They only display a message. cc - @prateekbh, @atcastle
17 lines
324 B
JavaScript
17 lines
324 B
JavaScript
module.exports = {
|
|
experimental: {
|
|
conformance: true,
|
|
},
|
|
webpack(cfg, { dev, isServer }) {
|
|
if (!dev && !isServer) {
|
|
cfg.optimization.splitChunks.cacheGroups.vendors = {
|
|
chunks: 'initial',
|
|
name: 'vendor',
|
|
test: 'vendor',
|
|
enforce: true,
|
|
}
|
|
}
|
|
|
|
return cfg
|
|
},
|
|
}
|