T
TanStack13mo ago
wise-white

Is colocation of code possible in route directory

If I'm understanding docs correctly it's not possible to colocate any other components in the route directory with the route. Every file turns into a route. I suppose it's possible with virtual file routing but not file / directory routing? This seems like a big problem because colocating one-off components for a specific page is really nice.
1 Reply
rising-crimson
rising-crimson13mo ago
I think "dot" eg: "/routes/.something.tsx" is ignored Otherwise, In your vite.config you can set both, or one of the following:
TanStackRouterVite({ routeFileIgnorePattern: "<SOME_PATTERN>", routeFileIgnorePrefix: "<SOME_PREFIX>" }),
TanStackRouterVite({ routeFileIgnorePattern: "<SOME_PATTERN>", routeFileIgnorePrefix: "<SOME_PREFIX>" }),

Did you find this page helpful?