Does Start support Router's Virtual File Routing as well?
It seems like it might but I'm unsure
13 Replies
metropolitan-bronze•5mo ago
yes
magic-amberOP•5mo ago
awesome!
is the starting point to use the
TanStackRouterVite
plugin and forgo things like __root.tsx
?metropolitan-bronze•5mo ago
no just put the config under the tsr key in app.config.ts
magic-amberOP•5mo ago
oh ok yeah i see
virtualRouteConfig
...
will __root.tsx still wrap that virtual config?metropolitan-bronze•5mo ago
what do you mean?
you need to add a root to your virtual config
whatever the name
metropolitan-bronze•5mo ago
Virtual File Routes | TanStack Router React Docs
We'd like to thank the Remix team for . We've taken inspiration from their work and adapted it to work with TanStack Router's existing file-based route-tree generation. Virtual file routes are a power...
magic-amberOP•5mo ago
right now in the tss docs the
__root.tsx
looks like the page shell with adding the <Scripts />
and other things then rendering {children}
i was trying to understand how that works if i'm defining a virtual configmetropolitan-bronze•5mo ago
which tss docs exactly?
you would just create the same file but can name it whatever you like
magic-amberOP•5mo ago
oh ok so the same file as this: https://tanstack.com/start/latest/docs/framework/react/build-from-scratch#the-root-of-your-application
metropolitan-bronze•5mo ago
virtual file routes is just a way for you to define your own naming "convention"
all other concepts stay the same
magic-amberOP•5mo ago
oh could you add api routes as well with
virtual-file-routes
?metropolitan-bronze•5mo ago
hmm
never tried
probably not?
magic-amberOP•5mo ago
ok!