mirror of
https://github.com/tuono-labs/tuono
synced 2026-07-26 05:12:46 -07:00
e4d4a75b88
* refactor: moved fs-router to standalone package * chore: remove useless split source function * feat: add simple test cases * fix: README formatting * fix: remove useless RouteSubNode * feat: update version to v0.4.4
41 lines
1021 B
TypeScript
41 lines
1021 B
TypeScript
// This file is auto-generated by Tuono
|
|
|
|
import { createRoute, dynamic } from 'tuono'
|
|
|
|
import RootImport from './routes/__root'
|
|
|
|
const AboutImport = dynamic(() => import('./routes/about'))
|
|
const IndexImport = dynamic(() => import('./routes/index'))
|
|
const PostsMyPostImport = dynamic(() => import('./routes/posts/my-post'))
|
|
|
|
const rootRoute = createRoute({ isRoot: true, component: RootImport })
|
|
|
|
const About = createRoute({ component: AboutImport })
|
|
const Index = createRoute({ component: IndexImport })
|
|
const PostsMyPost = createRoute({ component: PostsMyPostImport })
|
|
|
|
// Create/Update Routes
|
|
|
|
const AboutRoute = About.update({
|
|
path: '/about',
|
|
getParentRoute: () => rootRoute,
|
|
})
|
|
|
|
const IndexRoute = Index.update({
|
|
path: '/',
|
|
getParentRoute: () => rootRoute,
|
|
})
|
|
|
|
const PostsMyPostRoute = PostsMyPost.update({
|
|
path: '/posts/my-post',
|
|
getParentRoute: () => rootRoute,
|
|
})
|
|
|
|
// Create and export the route tree
|
|
|
|
export const routeTree = rootRoute.addChildren([
|
|
IndexRoute,
|
|
AboutRoute,
|
|
PostsMyPostRoute,
|
|
])
|