feat: add routes with ending slash

This commit is contained in:
Ayo Ayco 2024-08-17 21:16:40 +02:00
parent 58433c8371
commit 574c14fb13

View file

@ -120,7 +120,7 @@ declare const __prefix: string;`
const _routes = routes const _routes = routes
.filter(({ isIndex }) => isIndex) .filter(({ isIndex }) => isIndex)
.map(({ pathname }) => pathname) .flatMap(({ pathname }) => pathname === '/' ? pathname : [pathname, `${pathname}/`])
.filter(pathname => pathname !== '') .filter(pathname => pathname !== '')
?? []; ?? [];