-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Open
Description
Which project does this relate to?
Router
Describe the bug
When @tanstack/router-plugin auto code splitting is enabled, the transform crashes if any route sets errorComponent to null or false.
Type definitions allow this (errorComponent?: false | null | ErrorRouteComponent), but the code-splitter fails with:
Error: Unexpected splitNode type ☝️: BooleanLiteral
at .../@tanstack/router-plugin/src/core/code-splitter/compilers.ts:621:21
at Set.forEach (<anonymous>)
...
Your Example Website or App
https://stackblitz.com/edit/github-fb1d3cyr
Steps to Reproduce the Bug or Issue
- Open terminal
- Run
npm run build
Expected behavior
The plugin should gracefully handle booleans/nulls
Screenshots or Videos

Platform
- @tanstack/router-plugin: 1.130.16
- @tanstack/react-router: 1.130.12
- webpack: 5.91.0
Additional context
I'm setting errorComponent to null to handle all errors in my app using only defaultErrorComponent.
Metadata
Metadata
Assignees
Labels
No labels