Use commons chunk for JS code shared between entry points

This is a replacement for previous admin_vendor_chunk
see 422245e3e6/webpack.config.js (L235-L251)
The automatic splitting based on minChunks seems to give better results.
[MAILPOET-3214]
This commit is contained in:
Rostislav Wolny
2021-09-14 14:27:24 +02:00
committed by Veljko V
parent c6f9e240d8
commit e1c84f8d6d
2 changed files with 6 additions and 1 deletions

View File

@@ -298,7 +298,11 @@ const adminConfig = {
runtimeChunk: 'single',
splitChunks: {
cacheGroups: {
chunks: 'all',
commons: {
name: 'commons',
chunks: 'initial',
minChunks: 2,
},
},
}
},