Is there an equivalent of SolidStart's renaming index.tsx option?
Hey folks, super quick question that I can't seem to find in the docs:
Is there a way to rename
index.tsx
files within a nested file route? For example, SolidStart's file router has an option to rename these index files: https://docs.solidjs.com/solid-start/building-your-application/routing#renaming-index
Is there an option or equivalent way to achieve this in Router?4 Replies
foreign-sapphire•11mo ago
no we don't have this
you can create a feature request as a gh issue
another option are virtual file routes
those allow you arbitrarily named files
foreign-sapphire•11mo ago
TanStack | High Quality Open-Source Software for Web Developers
Headless, type-safe, powerful utilities for complex workflows like Data Management, Data Visualization, Charts, Tables, and UI Components.

absent-sapphireOP•11mo ago
No worries, I'll file one then!
For reference, I personally like using directory file based routing, I like how that keeps all my routes organized. BUT I dislike having lots of
index.tsx
files when I try to navigate around the project, especially via the command palette in VSCode. Renaming these index files is super nice for that type of orgnization.absent-sapphireOP•11mo ago
For any future lurkers: https://github.com/TanStack/router/discussions/2624
GitHub
Option to rename index files · TanStack router · Discussion #2624
When working with file-based routing, the default way to create a path that matches the directory name is to create an index.tsx file within that directory: . └── /routes/ ├── /posts/ │ └── index.t...