From c715b6f8bf3018b798051ca183bfcff93f481683 Mon Sep 17 00:00:00 2001 From: Luciano Vernaschi Date: Tue, 26 Mar 2024 11:48:29 +0200 Subject: [PATCH] fix(fs-router) remove `$phantom` (#2262) --- .../src/vite-plugin/collectRoutesFromFS.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/packages/ts/hilla-file-router/src/vite-plugin/collectRoutesFromFS.ts b/packages/ts/hilla-file-router/src/vite-plugin/collectRoutesFromFS.ts index d504fdf731..5fd8e4060d 100644 --- a/packages/ts/hilla-file-router/src/vite-plugin/collectRoutesFromFS.ts +++ b/packages/ts/hilla-file-router/src/vite-plugin/collectRoutesFromFS.ts @@ -45,8 +45,6 @@ async function checkFile(url: URL | undefined, logger: Logger): Promise { - const path = relative(fileURLToPath(parent), fileURLToPath(dir)).replaceAll(phantomDirPattern, ''); + const path = relative(fileURLToPath(parent), fileURLToPath(dir)); let children: RouteMeta[] = []; let layout: URL | undefined; @@ -89,7 +87,7 @@ export default async function collectRoutesFromFS( }); } else { throw new Error( - 'Symbol "$" is reserved for special directories and files; only "$layout", "$phantom" and "$index" are allowed', + 'Symbol "$" is reserved for special directories and files; only "$layout" and "$index" are allowed', ); } } else if (!name.startsWith('_')) {