I'm running into an issue with my monorepo setup using TanStack React Start and could really use some help.
My Setup:
- Monorepo with pnpm workspaces and Turbo
- TanStack React Start v1.130.12
- Vite v7.0.6
- Node v22.16.0
- React 19.1.1
Relevant package.json dependencies:
{
"@tanstack/react-router": "catalog:",
"@tanstack/react-start": "catalog:",
"@tanstack/router-plugin": "catalog:",
"@vitejs/plugin-react": "^4.3.4",
"vite": "catalog:",
"vite-tsconfig-paths": "^5.1.4"
}
vite.config.ts:
import tailwindcss from '@tailwindcss/vite';
import { tanstackStart } from '@tanstack/react-start/plugin/vite';
import viteReact from '@vitejs/plugin-react';
import { defineConfig } from 'vite';
import viteTsConfigPaths from 'vite-tsconfig-paths';
const config = defineConfig({
plugins: [
viteTsConfigPaths({
projects: ['./tsconfig.json'],
}),
tailwindcss(),
tanstackStart({
customViteReactPlugin: true,
spa: {
enabled: true,
},
}),
viteReact({
babel: {
plugins: [['babel-plugin-react-compiler']],
},
}),
],
resolve: {
alias: {
tslib: 'tslib/tslib.es6.js',
},
},
ssr: {
external: ['@prisma/client', 'better-auth', 'node:async_hooks'],
noExternal: ['@my-workspace/editor', 'zod', 'tslib'],
},
});
export default config; ```