mirror of
https://github.com/tuono-labs/tuono
synced 2026-07-29 22:02:46 -07:00
refactor: turn tuono-fs-router-vite-plugin into tuono-react-vite-plugin (#756)
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
// This file is auto-generated by Tuono
|
||||
|
||||
import { createRoute, __tuono__internal__lazyLoadRoute } from 'tuono'
|
||||
|
||||
import RootLayoutImport from './routes/__layout'
|
||||
|
||||
const IndexImport = __tuono__internal__lazyLoadRoute(
|
||||
() => import('./routes/index'),
|
||||
)
|
||||
const PostscatchallImport = __tuono__internal__lazyLoadRoute(
|
||||
() => import('./routes/posts/[...catch_all]'),
|
||||
)
|
||||
|
||||
const rootRoute = createRoute({ isRoot: true, component: RootLayoutImport })
|
||||
|
||||
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,
|
||||
hasHandler: true,
|
||||
})
|
||||
|
||||
// Create and export the route tree
|
||||
|
||||
export const routeTree = rootRoute.addChildren([IndexRoute, PostscatchallRoute])
|
||||
@@ -0,0 +1 @@
|
||||
/** export default */
|
||||
+1
@@ -0,0 +1 @@
|
||||
/** export default */
|
||||
Reference in New Issue
Block a user