Skip to content

fix: fixed statically indexed path for turbopack#8633

Merged
ovflowd merged 2 commits intomainfrom
hotfix/statically-index-turbopack
Feb 15, 2026
Merged

fix: fixed statically indexed path for turbopack#8633
ovflowd merged 2 commits intomainfrom
hotfix/statically-index-turbopack

Conversation

@ovflowd
Copy link
Member

@ovflowd ovflowd commented Feb 15, 2026

This PR is a hot-fix to Next.js complaining about Turbopack being unable to correctly statically analyze paths:

@node-core/website:build: ./apps/site/next.dynamic.mjs:104:24
@node-core/website:build: The file pattern ('/ROOT/apps/site/pages/' <dynamic> '/' <dynamic> | '/ROOT/apps/site/pages' <dynamic> '/' <dynamic> | '/ROOT/apps/site/pages/' <dynamic> | '/ROOT/apps/site/pages' <dynamic>) matches 10104 files in [project]/apps/site
@node-core/website:build:   102 |     if (pathnameToFilename.has(normalizedPathname)) {
@node-core/website:build:   103 |       const filename = pathnameToFilename.get(normalizedPathname);
@node-core/website:build: > 104 |       const filepath = join(process.cwd(), 'pages', locale, filename);
@node-core/website:build:       |                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@node-core/website:build:   105 |
@node-core/website:build:   106 |       // We verify if our Markdown cache already has a cache entry for a localized
@node-core/website:build:   107 |       // version of this file, because if not, it means that either
@node-core/website:build: 
@node-core/website:build: Overly broad patterns can lead to build performance issues and over bundling.
@node-core/website:build: 
@node-core/website:build: Import traces:
@node-core/website:build:   Server Component:
@node-core/website:build:     ./apps/site/next.dynamic.mjs
@node-core/website:build:     ./apps/site/app/[locale]/[...path]/page.tsx
@node-core/website:build: 
@node-core/website:build:   App Route:
@node-core/website:build:     ./apps/site/next.dynamic.mjs
@node-core/website:build:     ./apps/site/app/sitemap.ts
@node-core/website:build:     ./apps/site/app/sitemap--route-entry.js

Copilot AI review requested due to automatic review settings February 15, 2026 21:49
@ovflowd ovflowd requested a review from a team as a code owner February 15, 2026 21:49
@vercel
Copy link

vercel bot commented Feb 15, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
nodejs-org Ready Ready Preview Feb 15, 2026 10:14pm

Request Review

@github-actions
Copy link
Contributor

👋 Codeowner Review Request

The following codeowners have been identified for the changed files:

Team reviewers: @nodejs/web-infra

Please review the changes when you have a chance. Thank you! 🙏

@codecov
Copy link

codecov bot commented Feb 15, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 75.05%. Comparing base (fa01ac6) to head (7952ddc).
⚠️ Report is 1 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8633      +/-   ##
==========================================
- Coverage   75.09%   75.05%   -0.05%     
==========================================
  Files         104      104              
  Lines        9088     9088              
  Branches      314      315       +1     
==========================================
- Hits         6825     6821       -4     
- Misses       2261     2265       +4     
  Partials        2        2              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Hot-fix to address Next.js/Turbopack warnings about overly broad static path analysis when resolving localized Markdown file paths for the site’s dynamic router.

Changes:

  • Pre-compute the base pages/ directory path once in getDynamicRouter.
  • Replace path.join(process.cwd(), 'pages', locale, filename) with a pre-based string path to avoid Turbopack’s dynamic join() pattern analysis.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@github-actions
Copy link
Contributor

github-actions bot commented Feb 15, 2026

📦 Build Size Comparison

Summary

Metric Value
Old Total Size 3.74 MB
New Total Size 3.74 MB
Delta 0 B (0.00%)

Changes

➕ Added Assets (1)
Name Size
.next/static/chunks/d7531a01e315ad12.js 207.34 KB
➖ Removed Assets (1)
Name Size
.next/static/chunks/42bb8307ca53d9f6.js 207.34 KB

Copy link
Member

@AugustinMauroy AugustinMauroy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM !

@ovflowd ovflowd added this pull request to the merge queue Feb 15, 2026
@ovflowd ovflowd added the fast-track Fast Tracking PRs label Feb 15, 2026
@ovflowd
Copy link
Member Author

ovflowd commented Feb 15, 2026

cc @nodejs/nodejs-website fast-tracking as a hotfix.

Merged via the queue into main with commit b08f807 Feb 15, 2026
16 checks passed
@ovflowd ovflowd deleted the hotfix/statically-index-turbopack branch February 15, 2026 23:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fast-track Fast Tracking PRs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants