mirror of
https://github.com/hanzoai/next.js.git
synced 2026-09-24 17:00:51 +00:00
Recreation of https://github.com/vercel/next.js/pull/90314 --- ## Summary - Fix `--debug-build-paths` pages normalization in Turbopack so `pages/<name>/index.tsx` maps to `/<name>` (matching JS `getPageFromPath()` behavior). - Handle index page edge case: `/index.tsx -> /`. - Keep regression coverage in `test/production/debug-build-path/debug-build-paths.test.ts` with a generic fixture `pages/with-index/index.tsx`. ## Current Behavior Reference - CI run (before this fix) that failed as expected for this bug: - https://github.com/vercel/next.js/actions/runs/22266469801/job/64413677099?pr=90314#step:35:216 ## Root Cause Rust-side debug-build-path normalization removed file extensions but did not remove `/index`, producing route keys like `/with-index/index` while pages route keys are `/with-index`. That mismatch filtered out the page and caused `PageNotFoundError` during page-data collection. --------- Co-authored-by: devjiwonchoi <[email protected]>