Files
tuono/packages/tuono-react-vite-plugin/tests/generator/mdx/routeTree.expected.ts
T

34 lines
846 B
TypeScript
Raw Normal View History

2024-07-22 07:59:43 +02:00
// This file is auto-generated by Tuono
import { createRoute, __tuono__internal__lazyLoadRoute } from 'tuono'
2024-07-22 07:59:43 +02:00
import RootLayoutImport from './routes/__layout'
2024-07-22 07:59:43 +02:00
const AboutImport = __tuono__internal__lazyLoadRoute(
() => import('./routes/about.mdx'),
)
const IndexImport = __tuono__internal__lazyLoadRoute(
() => import('./routes/index'),
)
2024-07-22 07:59:43 +02:00
const rootRoute = createRoute({ isRoot: true, component: RootLayoutImport })
2024-07-22 07:59:43 +02:00
const About = createRoute({ component: AboutImport })
const Index = createRoute({ component: IndexImport })
// Create/Update Routes
const AboutRoute = About.update({
path: '/about',
getParentRoute: () => rootRoute,
})
const IndexRoute = Index.update({
path: '/',
getParentRoute: () => rootRoute,
})
// Create and export the route tree
export const routeTree = rootRoute.addChildren([IndexRoute, AboutRoute])