mirror of
https://github.com/cloudflare/vinext.git
synced 2026-05-09 08:25:34 +02:00
[PR #275] [MERGED] fix: static-prefix routes not outranking dynamic catch-alls in route scoring #434
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#434
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/275
Author: @james-elicx
Created: 3/5/2026
Status: ✅ Merged
Merged: 3/6/2026
Merged by: @james-elicx
Base:
main← Head:james/fix-static-route-priority📝 Commits (4)
5e7612afix: static-prefix routes not outranking dynamic catch-alls in route scoring40bc41cshare route precedence logic between app and pages routera1f0d32fix(routing): static-prefix boost collapsed infix-static ordering to a tie999aedfextra comment📊 Changes
8 files changed (+247 additions, -68 deletions)
View changed files
📝
packages/vinext/src/routing/app-router.ts(+1 -42)📝
packages/vinext/src/routing/pages-router.ts(+1 -26)➕
packages/vinext/src/routing/utils.ts(+71 -0)➕
tests/e2e/app-router/route-priority-static-suffix.spec.ts(+118 -0)➕
tests/fixtures/app-basic/app/locale-test/[locale]/[...path]/page.tsx(+15 -0)➕
tests/fixtures/app-basic/app/locale-test/[locale]/blog/[...path]/page.tsx(+15 -0)➕
tests/fixtures/app-basic/app/locale-test/[locale]/blog/page.tsx(+13 -0)➕
tests/fixtures/app-basic/app/locale-test/[locale]/page.tsx(+13 -0)📄 Description
Bit of an edge case in how routes were being ranked - it was possible for static routes in a certain scenario to be ranked at a lower priority than a catch-all, despite the fact that they should be a higher priority.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.