mirror of
https://github.com/cloudflare/vinext.git
synced 2026-05-09 08:25:34 +02:00
[GH-ISSUE #519] scanMetadataFiles should ignore @slot and _private directories #111
Labels
No labels
enhancement
enhancement
good first issue
help wanted
nextjs-tracking
nextjs-tracking
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/vinext#111
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @NathanDrake2406 on GitHub (Mar 13, 2026).
Original GitHub issue: https://github.com/cloudflare/vinext/issues/519
Summary
scanMetadataFiles()currently recurses into every directory except route groups, so metadata files under parallel-route slots and private folders become public metadata URLs.Reproduction
Given an app dir with:
scanMetadataFiles(appDir)currently returns routes with:servedUrl: "/@slot/icon"servedUrl: "/_private/icon"Expected
@slotdirectories should not produce public metadata URL segments. They are parallel-route internals, not part of the URL space._privatedirectories should be skipped entirely, matching Next.js private-folder behavior.Why this looks wrong
@slotand_privatedirectories when discovering routes.isInvisibleSegment()already treats@slotsegments as invisible in URLs.Likely fix
Teach
scanMetadataFiles()to:_privatedirectories entirely@slotdirectories without adding them tourlPrefixtests/metadata-routes.test.tsfor both cases