Files
tuono/packages/tuono-fs-router-vite-plugin/tests/generator/catch_all/routeTree.expected.ts
T

33 lines
860 B
TypeScript
Raw Normal View History

2024-12-10 19:30:35 +01:00
// This file is auto-generated by Tuono
import { createRoute, dynamic } from 'tuono'
import RootLayoutImport from './routes/__layout'
2024-12-10 19:30:35 +01:00
const IndexImport = dynamic(() => import('./routes/index'))
const PostscatchallImport = dynamic(
() => import('./routes/posts/[...catch_all]'),
)
const rootRoute = createRoute({ isRoot: true, component: RootLayoutImport })
2024-12-10 19:30:35 +01:00
const Index = createRoute({ component: IndexImport })
const Postscatchall = createRoute({ component: PostscatchallImport })
// Create/Update Routes
const IndexRoute = Index.update({
path: '/',
getParentRoute: () => rootRoute,
})
const PostscatchallRoute = Postscatchall.update({
path: '/posts/[...catch_all]',
getParentRoute: () => rootRoute,
2025-01-04 12:07:20 +01:00
hasHandler: true,
2024-12-10 19:30:35 +01:00
})
// Create and export the route tree
export const routeTree = rootRoute.addChildren([IndexRoute, PostscatchallRoute])