refactor: turn tuono-fs-router-vite-plugin into tuono-react-vite-plugin (#756)

This commit is contained in:
Valerio Ageno
2025-04-28 20:54:40 +02:00
committed by GitHub
parent 22844a37fa
commit b48f7244b7
47 changed files with 24 additions and 20 deletions
@@ -0,0 +1,33 @@
// This file is auto-generated by Tuono
import { createRoute, __tuono__internal__lazyLoadRoute } from 'tuono'
import RootLayoutImport from './routes/__layout'
const AboutImport = __tuono__internal__lazyLoadRoute(
() => import('./routes/about.mdx'),
)
const IndexImport = __tuono__internal__lazyLoadRoute(
() => import('./routes/index'),
)
const rootRoute = createRoute({ isRoot: true, component: RootLayoutImport })
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])
@@ -0,0 +1,2 @@
/** */
// export default