virtual-file-routes
Installation
SKILL.md
Virtual File Routes (@tanstack/virtual-file-routes)
Build route trees programmatically instead of relying on filesystem conventions. Useful when you want explicit control over route structure, need to mix virtual and physical routes, or want to define route subtrees within file-based routing directories.
Use this skill only when the project config contains virtualRouteConfig, a virtual route config file, or __virtual.ts. Ordinary file-route changes belong to Router Core and the Router Plugin.
CRITICAL: Types are FULLY INFERRED. Never cast, never annotate inferred values.
Install
npm install @tanstack/virtual-file-routes
API Reference
rootRoute(file, children?)
Creates the root of a virtual route tree.