From e97f18c53c8d56bc06ec1750c5b4b049294d7d49 Mon Sep 17 00:00:00 2001 From: Bill Date: Mon, 20 Sep 2021 04:17:38 -0400 Subject: [PATCH] Update craco config --- craco.config.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/craco.config.js b/craco.config.js index 661daecc..4f5320a4 100644 --- a/craco.config.js +++ b/craco.config.js @@ -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) =>