mirror of
https://github.com/cloudflare/vinext.git
synced 2026-05-09 08:25:34 +02:00
[PR #500] [MERGED] fix: serve metadata routes in dynamic segments #622
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#622
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?
📋 Pull Request Information
Original PR: https://github.com/cloudflare/vinext/pull/500
Author: @NathanDrake2406
Created: 3/12/2026
Status: ✅ Merged
Merged: 3/12/2026
Merged by: @james-elicx
Base:
main← Head:fix/metadata-routes-dynamic-segments📝 Commits (2)
264cb30fix: serve metadata routes in dynamic segments (opengraph-image, icon, etc.)f157a38fix: address review — scope patternParts to dynamic routes, fix indentation📊 Changes
4 files changed (+349 additions, -232 deletions)
View changed files
📝
packages/vinext/src/entries/app-rsc-entry.ts(+68 -34)📝
tests/__snapshots__/entry-templates.test.ts.snap(+246 -198)📝
tests/app-router.test.ts(+27 -0)➕
tests/fixtures/app-basic/app/blog/[slug]/opengraph-image.tsx(+8 -0)📄 Description
Summary
app/blog/[slug]/opengraph-image.tsx→ requesting/blog/hello-world/opengraph-image→ 404cleanPathname === metaRoute.servedUrl) butservedUrlcontains literal bracket notation (/blog/[slug]/opengraph-image){ params }so the function can generate per-page imagesFix
servedUrland generatepatternParts(reusing the existingmatchPattern()function already used for intercept routes)matchPattern()for metadata routes withpatternPartsto extract paramsmakeThenableParams(), matching Next.js behaviorTest plan
scanMetadataFilesdiscovers opengraph-image in dynamic segments/blog/hello-world/opengraph-imagereturns 200 with correct params🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.