From 34804d083aa99c69c0ff75b555b1bbc744609f5d Mon Sep 17 00:00:00 2001 From: Claudio Wunder Date: Sun, 15 Feb 2026 22:48:32 +0100 Subject: [PATCH 1/2] fix: fixed statically indexed path for turbopack --- apps/site/next.dynamic.mjs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/apps/site/next.dynamic.mjs b/apps/site/next.dynamic.mjs index 6dfea0d82f56a..7361cdffa21e5 100644 --- a/apps/site/next.dynamic.mjs +++ b/apps/site/next.dynamic.mjs @@ -55,6 +55,10 @@ const getDynamicRouter = async () => { // Keeps the map of pathnames to filenames const pathnameToFilename = new Map(); + // Pre-compute the pages directory path to avoid Turbopack's overly broad + // file pattern analysis when using path.join() with dynamic segments + const pagesDirectory = join(process.cwd(), 'pages'); + const websitePages = await getMarkdownFiles( process.cwd(), `pages/${defaultLocale.code}` @@ -101,7 +105,7 @@ const getDynamicRouter = async () => { // meaning that the route exists on the website and can be rendered if (pathnameToFilename.has(normalizedPathname)) { const filename = pathnameToFilename.get(normalizedPathname); - const filepath = join(process.cwd(), 'pages', locale, filename); + const filepath = `${pagesDirectory}/${locale}/${filename}`; // We verify if our Markdown cache already has a cache entry for a localized // version of this file, because if not, it means that either From 7952ddc6f5c3808b5c07f636cf5f0b8102419c3b Mon Sep 17 00:00:00 2001 From: Claudio Wunder Date: Sun, 15 Feb 2026 23:12:38 +0100 Subject: [PATCH 2/2] chore: use path normalization --- apps/site/next.dynamic.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/site/next.dynamic.mjs b/apps/site/next.dynamic.mjs index 7361cdffa21e5..6b539563162f2 100644 --- a/apps/site/next.dynamic.mjs +++ b/apps/site/next.dynamic.mjs @@ -105,7 +105,7 @@ const getDynamicRouter = async () => { // meaning that the route exists on the website and can be rendered if (pathnameToFilename.has(normalizedPathname)) { const filename = pathnameToFilename.get(normalizedPathname); - const filepath = `${pagesDirectory}/${locale}/${filename}`; + const filepath = normalize(`${pagesDirectory}/${locale}/${filename}`); // We verify if our Markdown cache already has a cache entry for a localized // version of this file, because if not, it means that either