We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Router
This could be similar to #2819, but the behaviour I am observing is slightly different:
export const Route = createFileRoute('/some-path')({ beforeLoad: async () => { if (2 + 2 === 4) { console.log('throwing') throw redirect({ to: '/some-other-path', }) } }, component: () => { console.log('component is running') return <Outlet /> }, })
If I hit this URL, I see this in the console:
throwing component is running
Apologies if I've misunderstood the purpose of beforeLoad, but isn't this as straightforward a bug as there could be?
beforeLoad
EDIT: This is related to #2818. If I set TanStackRouterVite.autoCodeSplitting to false, the bug no longer occurs.
TanStackRouterVite.autoCodeSplitting
false
http://example.com
Component should not be run.
No response
The text was updated successfully, but these errors were encountered:
please provide a minimal complete example by forking an existing example on stackblitz
Sorry, something went wrong.
I've provided the minimal repro via a code snippet, and further follow-up investigation. I have isolated the problem for you.
I will gladly close this issue. You can deal with the next user to report it, and they can jump through your hoops.
No branches or pull requests
Which project does this relate to?
Router
Describe the bug
This could be similar to #2819, but the behaviour I am observing is slightly different:
If I hit this URL, I see this in the console:
Apologies if I've misunderstood the purpose of
beforeLoad
, but isn't this as straightforward a bug as there could be?EDIT: This is related to #2818. If I set
TanStackRouterVite.autoCodeSplitting
tofalse
, the bug no longer occurs.Your Example Website or App
http://example.com
Steps to Reproduce the Bug or Issue
Expected behavior
Component should not be run.
Screenshots or Videos
No response
Platform
Additional context
No response
The text was updated successfully, but these errors were encountered: