Open History to see the last commit
1import {
2 index,
3 layout,
4 physical,
5 rootRoute,
6 route,
7} from '@tanstack/virtual-file-routes'
8β
9export const routes = rootRoute('root.tsx', [
10 index('home.tsx'),
11 route('/posts', 'posts/posts.tsx', [
12 index('posts/posts-home.tsx'),
13 route('$postId', 'posts/posts-detail.tsx'),
14 ]),
15 layout('first', 'layout/first-layout.tsx', [
16 layout('layout/second-layout.tsx', [
17 route('route-without-file', [
18 route('/layout-a', 'a.tsx'),
19 route('/layout-b', 'b.tsx'),
20 ]),
21 ]),
22 ]),
23 physical('/classic', 'file-based-subtree'),
24])