create-vanjs
Version:
🍦 Quick tool for scaffolding your first VanJS project
18 lines (14 loc) • 300 B
text/typescript
import { lazy, Route } from "@vanjs/router";
// Register routes
Route({
path: "/",
component: lazy(() => import("./pages/home")),
});
Route({
path: "/about",
component: lazy(() => import("./pages/about")),
});
Route({
path: "*",
component: lazy(() => import("./pages/not-found")),
});