mirror of
https://github.com/cloudflare/vinext.git
synced 2026-05-09 08:25:34 +02:00
[PR #171] [MERGED] Align Pages Router worker entry with prod-server request handling #367
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#367
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/171
Author: @southpolesteve
Created: 2/27/2026
Status: ✅ Merged
Merged: 2/27/2026
Merged by: @southpolesteve
Base:
main← Head:fix/pages-router-worker-request-handling📝 Commits (4)
d951af6Skip deploy previews for fork PRs that lack Cloudflare secretsfec8d6cfix: align Pages Router worker entry with prod-server request handling7df2f50Merge main into fix/pages-router-worker-request-handling28bd1bechore: sync pnpm-lock.yaml with upstream package.json changes📊 Changes
7 files changed (+907 additions, -184 deletions)
View changed files
📝
examples/pages-router-cloudflare/worker/index.ts(+203 -10)📝
examples/realworld-api-rest/worker/index.ts(+203 -10)📝
package.json(+2 -3)📝
packages/vinext/package.json(+4 -0)📝
packages/vinext/src/deploy.ts(+218 -11)📝
pnpm-lock.yaml(+151 -147)📝
tests/deploy.test.ts(+126 -3)📄 Description
Summary
The generated Cloudflare Worker entry for Pages Router apps (
generatePagesRouterWorkerEntry()) was missing several request handling steps that the Node.js production server (prod-server.ts) already handled. This brings the two implementations in sync.runMiddlewareand applyvinextConfigrules (redirects, rewrites, headers) in the generated worker entryrenderPagewith atypeofcheck for robustnessvinext/config/config-matchersfrom the package so the worker entry can import the shared matching utilitiespages-router-cloudflare,realworld-api-rest) to matchTest plan
tsgo --noEmit)oxlint --deny-warnings)🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.