fix(routing): resolve TanStack Router file-ignore and code-split warnings#1892
Merged
fix(routing): resolve TanStack Router file-ignore and code-split warnings#1892
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Resolves TanStack Router warnings by correcting which files/directories are ignored during route-tree generation and by removing named exports from route files to allow proper auto code-splitting.
Changes:
- Fix TanStack Router
routeFileIgnorePatternso non-route utilities underroutes/are excluded from route generation. - Remove named exports of route components from three route files to unblock TanStack Router chunk code-splitting.
- Update affected route tests to reference the route component via
Route.options.componentinstead of importing the component directly.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
renderer/vite.renderer.config.ts |
Updates routeFileIgnorePattern to ignore route-adjacent utility folders/files that were causing router warnings. |
renderer/src/routes/mcp-optimizer.tsx |
Removes named export from the route component to enable code-splitting. |
renderer/src/routes/(registry)/registry-group_.$name.tsx |
Removes named export from the route component to enable code-splitting. |
renderer/src/routes/(registry)/registry_.$name.tsx |
Removes named export from the route component to enable code-splitting. |
renderer/src/routes/__tests__/registry-group_.$name.test.tsx |
Updates test to access the component through Route.options.component. |
renderer/src/routes/__tests__/registry_.$name.test.tsx |
Updates test to access the component through Route.options.component. |
renderer/src/routes/__tests__/mcp-optimizer.test.tsx |
Updates test router setup to use Route.options.component instead of a named import. |
peppescg
approved these changes
Mar 31, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Change:
routeFileIgnorePatterninvite.renderer.config.ts— the pattern was matched against individual file/directory names (not full paths), soroot/with a trailing slash never matched anything. Replace with(__tests__|guards|hooks|root-error)to correctly exclude the guard utilities, hooks, and error boundary from the route tree.exportfromMcpOptimizerRoute,RegistryGroupDetail, andRegistryServerDetail— named exports from route files prevent TanStack Router from code-splitting those chunks.Route.options.componentinstead of the now-removed named imports.