From 9c476bff84d16f3c867c0e3c30db789425655ea7 Mon Sep 17 00:00:00 2001 From: Olaf Kappes Date: Fri, 3 Jul 2026 10:58:42 +0200 Subject: [PATCH] chore: pre-bundle dynamic deps used in react-ssr Signed-off-by: Olaf Kappes --- packages/debug-apps/react-ssr/vite.config.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/packages/debug-apps/react-ssr/vite.config.ts b/packages/debug-apps/react-ssr/vite.config.ts index a7cd1236f..804447c3b 100644 --- a/packages/debug-apps/react-ssr/vite.config.ts +++ b/packages/debug-apps/react-ssr/vite.config.ts @@ -15,6 +15,18 @@ import { const __dirname = dirname(fileURLToPath(import.meta.url)) export default defineConfig({ + /** + * Pre-bundle deps the static scanner can't see (react/compiler-runtime is + * injected by babel), so a late re-optimization can't crash the page mid-load. + */ + optimizeDeps: { + include: [ + "react/compiler-runtime", + "@tanstack/react-query", + "@floating-ui/dom", + "lodash-es", + ], + }, plugins: [ tailwindcss(), mdx({