From 574c14fb1351abe02dbdc7e8060f9b8d86bf3bf7 Mon Sep 17 00:00:00 2001 From: ayoayco Date: Sat, 17 Aug 2024 21:16:40 +0200 Subject: [PATCH] feat: add routes with ending slash --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index bc127b9..b952f14 100644 --- a/index.js +++ b/index.js @@ -120,7 +120,7 @@ declare const __prefix: string;` const _routes = routes .filter(({ isIndex }) => isIndex) - .map(({ pathname }) => pathname) + .flatMap(({ pathname }) => pathname === '/' ? pathname : [pathname, `${pathname}/`]) .filter(pathname => pathname !== '') ?? [];