T
TanStack3mo ago
correct-apricot

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
unwilling-turquoise
unwilling-turquoise3mo ago
currently the code generator relies on the exact form export const Route will soon support the other export as well
correct-apricot
correct-apricotOP3mo ago
Okay, thank you. Is there a GitHub issue I can use to track this?
unwilling-turquoise
unwilling-turquoise3mo ago
no, can you please create a GitHub issue so we can track this?

Did you find this page helpful?