From 776bec7ef8c8f1f358ddee9061f67d07d7c4c274 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89mile=20R=C3=A9?= Date: Mon, 20 Jul 2026 14:53:54 +0200 Subject: [PATCH] Add bundling options to put base deps in specific chunks MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Émile Ré --- apps/compliance-portal/vite.config.ts | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/apps/compliance-portal/vite.config.ts b/apps/compliance-portal/vite.config.ts index cfe1dd256..44abb0389 100644 --- a/apps/compliance-portal/vite.config.ts +++ b/apps/compliance-portal/vite.config.ts @@ -32,6 +32,26 @@ export default defineConfig({ plugins: [react(), babel({ plugins: ["relay"] }), tailwindcss()], build: { assetsDir: "assets", + rolldownOptions: { + output: { + codeSplitting: { + groups: [ + { + name: "react", + test: /node_modules\/(?:react-dom|react)\//, + }, + { + name: "relay", + test: /node_modules\/(?:react-relay|relay-runtime)\//, + }, + { + name: "react-router", + test: /node_modules\/react-router\//, + }, + ], + }, + }, + }, }, base: "./", server: {