T
TanStack6mo ago
like-gold

Exporting the root route with a bottom `export { Route }` doesn't seem to work

Hey there. I'm not sure if this is a bug or intended behaviour, so I'm posting this here first. In my __root.tsx file I have this:
export const Route = createRootRoute({
// ...
})
export const Route = createRootRoute({
// ...
})
It works as expected, but if I change it to this:
const Route = createRootRoute({
// ...
})


export { Route }
const Route = createRootRoute({
// ...
})


export { Route }
It stops working... Is this a bug?
No description
3 Replies
equal-aqua
equal-aqua6mo ago
currently the code generator relies on the exact form export const Route will soon support the other export as well
like-gold
like-goldOP6mo ago
Okay, thank you. Is there a GitHub issue I can use to track this?
equal-aqua
equal-aqua6mo ago
no, can you please create a GitHub issue so we can track this?

Did you find this page helpful?