From 9f06df64155b8535343ecbbdae89925defe65006 Mon Sep 17 00:00:00 2001 From: ennajari Date: Fri, 10 Apr 2026 16:20:52 +0100 Subject: [PATCH] fix(tests): handle unknown .jsx extension for TanStack solid dependencies @tanstack/solid-store and related packages ship .jsx source files. Vitest cannot load these directly in Node.js without a JSX transform. Add all @tanstack/solid-* packages to deps.optimizer.web.include so Vite pre-bundles them through its transform pipeline (including vite-plugin-solid), and to ssr.noExternal in the jsx project so they are also bundled in the SSR-like Node.js module loading context. Fixes #7801 --- frontend/vitest.config.ts | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/frontend/vitest.config.ts b/frontend/vitest.config.ts index a981b4ccd897..b75437972ffa 100644 --- a/frontend/vitest.config.ts +++ b/frontend/vitest.config.ts @@ -36,7 +36,15 @@ export const projects: UserWorkspaceConfig[] = [ }, { ssr: { - noExternal: ["@solidjs/meta"], + noExternal: [ + "@solidjs/meta", + "@tanstack/solid-store", + "@tanstack/solid-form", + "@tanstack/solid-query", + "@tanstack/solid-table", + "@tanstack/solid-hotkeys", + "@tanstack/solid-db", + ], }, test: { name: { label: "jsx", color: "green" }, @@ -61,7 +69,15 @@ export default defineConfig({ deps: { optimizer: { web: { - include: ["@monkeytype/funbox"], + include: [ + "@monkeytype/funbox", + "@tanstack/solid-store", + "@tanstack/solid-form", + "@tanstack/solid-query", + "@tanstack/solid-table", + "@tanstack/solid-hotkeys", + "@tanstack/solid-db", + ], }, }, },