From d2d0b1c496e857c7b9714137a2438a6b97721de4 Mon Sep 17 00:00:00 2001 From: Dominique Loiseau <5888729+domi7777@users.noreply.github.com> Date: Sat, 28 Sep 2024 22:26:45 +0200 Subject: [PATCH] perf(vite): split chunks --- src/Kit.tsx | 1 + vite.config.ts | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/src/Kit.tsx b/src/Kit.tsx index b873ca4..72bb9ec 100644 --- a/src/Kit.tsx +++ b/src/Kit.tsx @@ -31,4 +31,5 @@ export const Kit = () => { resizeGame(game); }); } + return <>; } diff --git a/vite.config.ts b/vite.config.ts index 8aa59c6..1d04a06 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -50,4 +50,14 @@ export default defineConfig({ } }) ], + build: { + rollupOptions: { + output: { + manualChunks: { + react: ['react', 'react-dom'], + phaser: ['phaser'], + } + } + } + } })