From 30b18f60be81c3b1934f96a1ffc74494101e135a Mon Sep 17 00:00:00 2001 From: tresabhi <43380238+tresabhi@users.noreply.github.com> Date: Thu, 20 Mar 2025 01:00:20 -0500 Subject: [PATCH] fix: optional static paths --- packages/website/src/pages/[...locale]/api/index.astro | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/website/src/pages/[...locale]/api/index.astro b/packages/website/src/pages/[...locale]/api/index.astro index f06dd47d6..4121c73cb 100644 --- a/packages/website/src/pages/[...locale]/api/index.astro +++ b/packages/website/src/pages/[...locale]/api/index.astro @@ -48,15 +48,14 @@ const globRaw = import.meta.glob('/src/pages/api/**/*.ts', { }) as Record; const globStaticPaths = import.meta.glob('/src/pages/api/**/*.ts', { eager: true, - import: 'getStaticPaths', -}) as Record; +}) as Record; let apis: APIPath[] = []; for (const rawPath in globRaw) { const content = globRaw[rawPath].replaceAll('\r', ''); const regexExecution = content.match(getDocsRegex); const commentRaw = regexExecution?.[1]; - const getStaticPaths = globStaticPaths[rawPath]; + const { getStaticPaths } = globStaticPaths[rawPath]; let slugs: APIPath['slugs'] | undefined; if (getStaticPaths) {