chore(webpack): do not split chunks

This commit is contained in:
Sarah Vaupel 2022-04-22 13:49:20 +02:00
parent ec4d710ce0
commit 3a6127d885

View File

@ -284,32 +284,6 @@ async function webpackConfig() {
moduleIds: 'named',
chunkIds: 'named',
runtimeChunk: 'single',
splitChunks: {
chunks: 'all',
maxInitialRequests: Infinity,
maxAsyncRequests: Infinity,
minSize: 0,
minChunks: 1,
cacheGroups: {
vendor: {
test(module, chunk) {
return module.context && module.context.match(/[\\/]node_modules[\\/]/);
},
name(module, chunks, cacheGroupKey) {
const moduleFileName = module.identifier().split('/').reduceRight(item => item);
const allChunksNames = chunks.map((item) => item.name).join('~');
const packageName = module.context.match(/[\\/]node_modules[\\/](.*?)([\\/]|$)/)[1];
return `${cacheGroupKey}-${packageName}-${allChunksNames}-${moduleFileName}`;
},
priority: -10
},
default: {
priority: -20,
minChunks: 1
}
}
},
realContentHash: false
},