T
TanStack3mo ago
national-gold

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
national-gold
national-goldOP3mo 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,
})
genetic-orange
genetic-orange3mo ago
any errors?
national-gold
national-goldOP3mo ago
Only this: SyntaxError: Cannot declare an imported binding name twice: 'injectIntoGlobalHook'.
genetic-orange
genetic-orange3mo ago
I mean it looks fine at first glance
national-gold
national-goldOP3mo 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
genetic-orange
genetic-orange3mo ago
can you maybe put it at the end? not sure if that would make any difference
national-gold
national-goldOP3mo ago
Goes back to not working in that case
genetic-orange
genetic-orange3mo 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?
national-gold
national-goldOP3mo ago
Yes that works! React devtools shows the little "memo ✨"
genetic-orange
genetic-orange3mo ago
woohoo and the full page reload is gone?
national-gold
national-goldOP3mo 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
genetic-orange
genetic-orange3mo ago
it could be something with how the vite plugins come together through the different configs
national-gold
national-goldOP3mo 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?