Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/danielroe/roe.dev. This is the code and content for my personal website, built in Nuxt. roe.dev
Something went wrong. Try again.
TypeScript
at feat/nuxt-v5
123456789101112131415import { withoutTrailingSlash } from 'ufo'import _routes from '#build/routes.mjs'
interface NuxtRoute { path: string | RegExp component: any meta?: Record<string, any>}
export const routes: NuxtRoute[] = _routesexport const match = (path: string) => routes.find(r => typeof r.path === 'string' ? r.path === withoutTrailingSlash(path) : r.path.test(withoutTrailingSlash(path)), )