Update craco config

This commit is contained in:
Bill 2021-09-20 04:17:38 -04:00
parent cc33ba3e36
commit e97f18c53c

View File

@ -5,6 +5,23 @@ module.exports = {
webpack: {
configure: (webpackConfig) => ({
...webpackConfig,
optimization: {
...webpackConfig.optimization,
splitChunks: {
cacheGroups: {
vendor: {
name: 'vendors',
test: /[\\/]node_modules[\\/]/,
chunks: 'all',
},
renderer: {
name: 'renderer',
test: /[\\/]node_modules[\\/]@nitrots[\\/]nitro-renderer[\\/]/,
chunks: 'all',
}
}
}
},
module: {
...webpackConfig.module,
rules: webpackConfig.module.rules.map((rule) =>