Route Path in `createFileRoute` Keeps Auto-Correcting to Remove Layout Folder
Hi all,
I’m running into an issue with TanStack Router’s file-based routing. My file structure is: In
I’m running into an issue with TanStack Router’s file-based routing. My file structure is: In
_authenticated.create-log.tsx
, I set up the route like this:
But whenever I save the file, the path in createFileRoute
automatically changes to:
This causes a TypeScript error:
It seems like some tool or extension is auto-correcting the route path and removing the _authenticated
part, even though I want to keep the file path for type safety.
Has anyone else run into this? Is there a way to prevent this auto-correction or configure it to keep the full file path?
Thanks!3 Replies
conscious-sapphire•3w ago
i cannot reproduce this here https://stackblitz.com/edit/tanstack-router-xbbmo2kc?file=src%2Froutes%2F_authenticated.create-log.tsx&preset=node
minicheck@googlemail.com
StackBlitz
Router Quickstart File Based Example (duplicated) - StackBlitz
Run official live example code for Router Quickstart File Based, created by Tanstack on StackBlitz
conscious-sapphire•3w ago
our vite plugin automatically sets that path
this cannot be turned off and is necessary
can you please provide a complete minimal example that reproduces this error?
ratty-blushOP•3w ago
Hey this was fixed after I close the cursor and reopen it 😖