feat: detect rust handler file

This commit is contained in:
Valerio Ageno
2024-05-11 15:27:51 +02:00
parent 73c94e5fbb
commit 4a8a24c708
6 changed files with 75 additions and 18 deletions
@@ -0,0 +1,30 @@
// This file is auto-generated by Tuono
import { createRoute } from 'tuono'
import RootImport from './routes/__root'
import AboutImport from './routes/about'
import IndexImport from './routes/index'
const rootRoute = createRoute({ isRoot: true, component: RootImport })
const About = createRoute({ component: AboutImport })
const Index = createRoute({ component: IndexImport })
// Create/Update Routes
const AboutRoute = About.update({
path: '/about',
getParentRoute: () => rootRoute,
} as any)
const IndexRoute = Index.update({
path: '/',
getParentRoute: () => rootRoute,
hasHandler: true,
} as any)
// Create and export the route tree
export const routeTree = rootRoute.addChildren([IndexRoute, AboutRoute])