Add bundling options to put base deps in specific chunks

Signed-off-by: Émile Ré <emile@probo.com>
This commit is contained in:
Émile Ré
2026-07-20 14:53:54 +02:00
parent a41aa3ce07
commit 776bec7ef8

View File

@@ -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: {