diff --git a/packages/start-config/src/index.ts b/packages/start-config/src/index.ts index 337955d567..eee71884e5 100644 --- a/packages/start-config/src/index.ts +++ b/packages/start-config/src/index.ts @@ -184,13 +184,7 @@ export function defineConfig( viteConfig.userConfig.ssr, clientViteConfig.userConfig.ssr, { - noExternal: [ - '@tanstack/start', - '@tanstack/start-router-manifest', - '@tanstack/start-server-functions-handler', - 'tsr:routes-manifest', - 'tsr:server-fn-manifest', - ], + noExternal, }, ]), optimizeDeps: { @@ -251,13 +245,7 @@ export function defineConfig( viteConfig.userConfig.ssr, ssrViteConfig.userConfig.ssr, { - noExternal: [ - '@tanstack/start', - '@tanstack/start-router-manifest', - '@tanstack/start-server-functions-handler', - 'tsr:routes-manifest', - 'tsr:server-fn-manifest', - ], + noExternal, external: ['@vinxi/react-server-dom/client'], }, ]), @@ -321,13 +309,7 @@ export function defineConfig( viteConfig.userConfig.ssr, serverViteConfig.userConfig.ssr, { - noExternal: [ - '@tanstack/start', - '@tanstack/start-router-manifest', - '@tanstack/start-server-functions-handler', - 'tsr:routes-manifest', - 'tsr:server-fn-manifest', - ], + noExternal, }, ]), optimizeDeps: { @@ -373,6 +355,22 @@ export function defineConfig( ], }) + const noExternal = [ + '@tanstack/start', + '@tanstack/start-client', + '@tanstack/start-server', + '@tanstack/start-server-functions-fetcher', + '@tanstack/start-server-functions-handler', + '@tanstack/start-server-functions-client', + '@tanstack/start-server-functions-ssr', + '@tanstack/start-server-functions-server', + '@tanstack/start-router-manifest', + '@tanstack/start-config', + '@tanstack/server-functions-plugin', + 'tsr:routes-manifest', + 'tsr:server-fn-manifest', + ] + // If API routes handler exists, add a router for it if (apiEntryExists) { vinxiApp = vinxiApp.addRouter({ @@ -395,13 +393,7 @@ export function defineConfig( viteConfig.userConfig.ssr, apiViteConfig.userConfig.ssr, { - noExternal: [ - '@tanstack/start', - '@tanstack/start-router-manifest', - '@tanstack/start-server-functions-handler', - 'tsr:routes-manifest', - 'tsr:server-fn-manifest', - ], + noExternal, }, ]), optimizeDeps: {