mirror of
https://github.com/cloudflare/vinext.git
synced 2026-05-09 08:25:34 +02:00
[PR #252] [MERGED] fix: apps with both app + pages router returning 404s #419
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#419
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/252
Author: @james-elicx
Created: 3/4/2026
Status: ✅ Merged
Merged: 3/5/2026
Merged by: @southpolesteve
Base:
main← Head:james/app-pages-fix📝 Commits (4)
f65432efix: apps with both app + pages router returning 404s45aa6a8apply same fix for api routescf98cbdtest for pages dir route584704balways filter x-middleware headers, and preserve others on redirect📊 Changes
4 files changed (+56 additions, -12 deletions)
View changed files
📝
packages/vinext/src/index.ts(+23 -5)📝
packages/vinext/src/server/middleware.ts(+14 -7)📝
tests/app-router.test.ts(+12 -0)➕
tests/fixtures/app-basic/pages/old-school.tsx(+7 -0)📄 Description
If an app has both an app directory and a pages directory, all its app directory routes return 404s.
Regression test is achieved through simply having a pages directory route live in the app directory fixture. Without this patch, you then get 404s.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.