From 199a0dd6331e8cf92bbfa295c4fbefef695d912d Mon Sep 17 00:00:00 2001 From: renkei <30912473+renkei@users.noreply.github.com> Date: Fri, 2 Jun 2023 15:06:14 +0200 Subject: [PATCH] Fixes backslash issue on Windows Fix #868 and #871 --- packages/fs-routes/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/fs-routes/index.ts b/packages/fs-routes/index.ts index 0eb695d0..a75a1785 100644 --- a/packages/fs-routes/index.ts +++ b/packages/fs-routes/index.ts @@ -55,7 +55,7 @@ export default function fsRoutes( .sort(compare) .map((file) => ({ path: path.resolve(dir, file), - route: '/' + file.replace(options.indexFileRegExp, ''), + route: '/' + file.replace(options.indexFileRegExp, '').replace(/\\/g, '/'), })); }