[PR #261] [MERGED] feat(routing): respect pageExtensions for app/pages route discovery #423

Closed
opened 2026-05-06 12:39:44 +02:00 by BreizhHardware · 0 comments

📋 Pull Request Information

Original PR: https://github.com/cloudflare/vinext/pull/261
Author: @illegalcall
Created: 3/5/2026
Status: Merged
Merged: 3/6/2026
Merged by: @james-elicx

Base: mainHead: support-pageextensions-mdx-251


📝 Commits (2)

  • 60f1ac4 feat(routing): respect pageExtensions for app/pages route discovery
  • f73aa04 fix(routing): normalize pageExtensions input, share ValidFileMatcher, fix static-export parity

📊 Changes

10 files changed (+521 additions, -113 deletions)

View changed files

📝 packages/vinext/src/build/static-export.ts (+10 -8)
📝 packages/vinext/src/config/next-config.ts (+8 -0)
📝 packages/vinext/src/index.ts (+34 -26)
📝 packages/vinext/src/routing/app-router.ts (+129 -49)
packages/vinext/src/routing/file-matcher.ts (+106 -0)
📝 packages/vinext/src/routing/pages-router.ts (+54 -17)
📝 packages/vinext/src/server/dev-server.ts (+16 -13)
tests/file-matcher.test.ts (+44 -0)
tests/page-extensions-routing.test.ts (+90 -0)
📝 tests/shims.test.ts (+30 -0)

📄 Description

feat(routing): respect pageExtensions for app/pages route discovery

  • read next.config pageExtensions into resolved config
  • add shared file matcher for extension-aware scanning
  • apply matcher to App Router and Pages/API route scanners
  • wire pageExtensions through plugin route generation and file watching
  • add unit tests for matcher behavior and mdx positive/negative routing cases

Fixed: https://github.com/cloudflare/vinext/issues/251


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/cloudflare/vinext/pull/261 **Author:** [@illegalcall](https://github.com/illegalcall) **Created:** 3/5/2026 **Status:** ✅ Merged **Merged:** 3/6/2026 **Merged by:** [@james-elicx](https://github.com/james-elicx) **Base:** `main` ← **Head:** `support-pageextensions-mdx-251` --- ### 📝 Commits (2) - [`60f1ac4`](https://github.com/cloudflare/vinext/commit/60f1ac4121e5d6deb0d9ffa31bea8be5da86f64a) feat(routing): respect pageExtensions for app/pages route discovery - [`f73aa04`](https://github.com/cloudflare/vinext/commit/f73aa04d06a6e066a860f29fa56e4e969fe55107) fix(routing): normalize pageExtensions input, share ValidFileMatcher, fix static-export parity ### 📊 Changes **10 files changed** (+521 additions, -113 deletions) <details> <summary>View changed files</summary> 📝 `packages/vinext/src/build/static-export.ts` (+10 -8) 📝 `packages/vinext/src/config/next-config.ts` (+8 -0) 📝 `packages/vinext/src/index.ts` (+34 -26) 📝 `packages/vinext/src/routing/app-router.ts` (+129 -49) ➕ `packages/vinext/src/routing/file-matcher.ts` (+106 -0) 📝 `packages/vinext/src/routing/pages-router.ts` (+54 -17) 📝 `packages/vinext/src/server/dev-server.ts` (+16 -13) ➕ `tests/file-matcher.test.ts` (+44 -0) ➕ `tests/page-extensions-routing.test.ts` (+90 -0) 📝 `tests/shims.test.ts` (+30 -0) </details> ### 📄 Description feat(routing): respect pageExtensions for app/pages route discovery - read next.config pageExtensions into resolved config - add shared file matcher for extension-aware scanning - apply matcher to App Router and Pages/API route scanners - wire pageExtensions through plugin route generation and file watching - add unit tests for matcher behavior and mdx positive/negative routing cases Fixed: https://github.com/cloudflare/vinext/issues/251 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
BreizhHardware 2026-05-06 12:39:44 +02:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/vinext#423
No description provided.