next.js
d8c05e60 - Fix metadata route selection with `--debug-build-paths` (#101585)

Commit
23 days ago
Fix metadata route selection with `--debug-build-paths` (#101585) PR #95788 added metadata files to build-path discovery. Turbopack's separate route filter still compared source filenames with generated route keys, so builds silently omitted selected metadata routes. For example, `pnpm exec next build --debug-build-paths 'app/[slug]/opengraph-image.tsx'` built only `/_not-found` in the `use-cache-metadata-route-handler` fixture. The build omitted `/[slug]/opengraph-image` and its prerendered post images. This change uses the shared metadata matcher and route normalization to construct the filter's route keys. The production tests now cover metadata handlers, generated variants, static files, route groups, and glob exclusions.
Author
Parents
Loading