T
TanStack6mo ago
harsh-harlequin

Devinxi - full page reload and some missing styles

Hey all, I just updated to 1.121.0 and seeing all links lead to full page reload and some styles are missing. I followed the upgrade guide and have double checked my setup against the basic example. Has anyone else got this issue too?
13 Replies
harsh-harlequin
harsh-harlequinOP6mo ago
My vite config:
export default defineConfig({
server: {
port: 3000,
},
test: {
// ...
},
plugins: [
tsconfigPaths(),
tailwindcss(),
react({ babel: { plugins: ["babel-plugin-react-compiler"] } }),
tanstackStart({
tsr: {
verboseFileRoutes: false,
quoteStyle: "double",
},
}),
],
})
export default defineConfig({
server: {
port: 3000,
},
test: {
// ...
},
plugins: [
tsconfigPaths(),
tailwindcss(),
react({ babel: { plugins: ["babel-plugin-react-compiler"] } }),
tanstackStart({
tsr: {
verboseFileRoutes: false,
quoteStyle: "double",
},
}),
],
})
And router config:
export const createRouter = () =>
createTanStackRouter({
routeTree,
defaultPreload: "intent",
defaultViewTransition: true,
defaultErrorComponent: DefaultCatchBoundary,
defaultNotFoundComponent: NotFound,
scrollRestoration: true,
})
export const createRouter = () =>
createTanStackRouter({
routeTree,
defaultPreload: "intent",
defaultViewTransition: true,
defaultErrorComponent: DefaultCatchBoundary,
defaultNotFoundComponent: NotFound,
scrollRestoration: true,
})
national-gold
national-gold6mo ago
any errors?
harsh-harlequin
harsh-harlequinOP6mo ago
Only this: SyntaxError: Cannot declare an imported binding name twice: 'injectIntoGlobalHook'.
national-gold
national-gold6mo ago
I mean it looks fine at first glance
harsh-harlequin
harsh-harlequinOP6mo ago
Ah it works if I remove the react plugin Is the react plugin necessary at all then? Is there a way to enable the react compiler via the start plugin? I see some babel options in there
national-gold
national-gold6mo ago
can you maybe put it at the end? not sure if that would make any difference
harsh-harlequin
harsh-harlequinOP6mo ago
Goes back to not working in that case
national-gold
national-gold6mo ago
Does this work for the vite plugin?
tanstackStart({
react: {
babel: {
plugins: [
[
"babel-plugin-react-compiler",
{
target: "19",
},
],
],
},
},
tanstackStart({
react: {
babel: {
plugins: [
[
"babel-plugin-react-compiler",
{
target: "19",
},
],
],
},
},
oh so its exactly what you had just put it instead the tanstackStart() plugin?
harsh-harlequin
harsh-harlequinOP6mo ago
Yes that works! React devtools shows the little "memo ✨"
national-gold
national-gold6mo ago
woohoo and the full page reload is gone?
harsh-harlequin
harsh-harlequinOP6mo ago
Not sure what about the Vite React plugin causes it to break, but seems like it's not necessary anyway when using Start Yes it's working fine
national-gold
national-gold6mo ago
it could be something with how the vite plugins come together through the different configs
harsh-harlequin
harsh-harlequinOP6mo ago
Who knows 🤷‍♂️ Anyway, might be worth adding the above snippet to one of the guides, since it's not clear from the React Compiler documentation that there are other ways to enable it

Did you find this page helpful?