TanStackT
TanStack2mo ago
3 replies
foolish-indigo

Updating router/start

Hello! im trying to update tanstack router/start from 1.128.3 to 1.139.6, i installed the packages and made some minor modification to the vite config and its working as expected, but i notice that now we need to add the vite react plugin that was previously not needed, i installed @vitejs/plugin-react and added it like this
import { cloudflare } from '@cloudflare/vite-plugin';
import { tanstackStart } from '@tanstack/react-start/plugin/vite';
import svgr from 'vite-plugin-svgr';
import tsConfigPaths from 'vite-tsconfig-paths';
import viteReact from '@vitejs/plugin-react';

...

tsConfigPaths({
    projects: ['./tsconfig.json'],
}),
cloudflare({ viteEnvironment: { name: 'ssr' } }),
tanstackStart({}),
viteReact(),
svgr(),


And not the SSR response works but after the JS runs in the front i get
_s is not a function
inside some weird react refresh code inside one of my routes (not part of my code)

If i remove the vite react plugin it woks as expected, but i wanted to add the react compiler, any idea whats going on here?

This are the relevan versions in my package json
"@tanstack/react-router": "^1.139.6",
"@tanstack/react-start": "^1.139.6",
"@vitejs/plugin-react": "^5.1.1",
"react": "^19.0.2",
"react-dom": "^19.0.2",
Was this page helpful?