chore(webpack): do not split chunks
This commit is contained in:
parent
ec4d710ce0
commit
3a6127d885
@ -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
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user