Fix webpack code splitting (#3385)
This commit is contained in:
parent
a3800e16a5
commit
860ca7d777
@ -229,11 +229,19 @@ export default function createConfig(
|
|||||||
|
|
||||||
devtool: APP_ENV === 'production' && IS_ELECTRON ? undefined : 'source-map',
|
devtool: APP_ENV === 'production' && IS_ELECTRON ? undefined : 'source-map',
|
||||||
|
|
||||||
...(APP_ENV !== 'production' && {
|
optimization: {
|
||||||
optimization: {
|
...(APP_ENV !== 'production' && { chunkIds: 'named' }),
|
||||||
chunkIds: 'named',
|
...(['production', 'staging'].includes(APP_ENV) && {
|
||||||
},
|
splitChunks: {
|
||||||
}),
|
cacheGroups: {
|
||||||
|
default: {
|
||||||
|
chunks: 'all',
|
||||||
|
minSize: 1,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user