-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Open
Description
Which project does this relate to?
Router
Describe the bug
The routeToken and indexToken configuration values for TanStack Router are not working as expected. Routes beginning with a "+" symbol are not working as index or layout routes.
Your Example Website or App
https://stackblitz.com/edit/tanstack-router-o6v4qzgj?file=vite.config.js
Steps to Reproduce the Bug or Issue
- Setup TanStack Router with a file-based routing setup
- Update the
routeTokenandindexTokenconfiguration values torouteToken: '+layout'andindexToken: '+page' - Create an index route,
+page.tsx, which should correctly have the route set. - Create a folder and create and index route within that folder,
folder/+page.tsx, the route is not set correctly.
Expected behavior
I expect the index and route tokens to allow setting regexes which accept values such as + at the beginning of the token. This should work for both the base index route as well as routes within folders.
Screenshots or Videos
No response
Platform
- Router / Start Version: ^1.168.3
- OS: macOs
- Browser: Chrome
- Browser Version:
- Bundler: Vite
- Bundler Version: 7.0.0
Additional context
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels