mirror of
https://github.com/cloudflare/vinext.git
synced 2026-05-09 08:25:34 +02:00
[PR #983] [MERGED] refactor: Extract early config header and public file pipeline #999
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#999
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/983
Author: @NathanDrake2406
Created: 4/30/2026
Status: ✅ Merged
Merged: 4/30/2026
Merged by: @james-elicx
Base:
main← Head:nathan/config-header-public-early-pipeline📝 Commits (1)
1bbf648refactor: extract early request pipeline helpers📊 Changes
9 files changed (+427 additions, -316 deletions)
View changed files
📝
packages/vinext/package.json(+4 -0)📝
packages/vinext/src/deploy.ts(+6 -21)📝
packages/vinext/src/entries/app-rsc-entry.ts(+16 -38)📝
packages/vinext/src/server/prod-server.ts(+6 -22)📝
packages/vinext/src/server/request-pipeline.ts(+138 -4)📝
tests/__snapshots__/entry-templates.test.ts.snap(+96 -228)📝
tests/app-router.test.ts(+1 -1)📝
tests/deploy.test.ts(+4 -2)📝
tests/request-pipeline.test.ts(+156 -0)📄 Description
Summary
next.config.jsheader application intorequest-pipelinehelpers for both WebHeadersand early header records.request-pipeline, leaving generated RSC entry code to describe app shape and route manifests.vinext/server/request-pipelinefor generated worker code.Next.js references
Vinext should keep the route policy aligned with Next.js while keeping behavior out of generated templates:
headers,redirects, proxy/middleware,beforeFiles, then filesystem routes includingpublic/: https://github.com/vercel/next.js/blob/canary/docs/01-app/03-api-reference/03-file-conventions/proxy.mdxresolve-routes.tsmodels that same order withfsChecker.headers,fsChecker.redirects, middleware,rewrites.beforeFiles, and filesystem checks: https://github.com/vercel/next.js/blob/canary/packages/next/src/server/lib/router-utils/resolve-routes.ts/publicfiles: https://github.com/vercel/next.js/blob/canary/docs/01-app/03-api-reference/05-config/01-next-config-js/redirects.mdxfilesystem.ts: https://github.com/vercel/next.js/blob/canary/packages/next/src/server/lib/router-utils/filesystem.tsTests
vp test run tests/request-pipeline.test.tsvp test run tests/app-router.test.ts -t "custom header handling|empty config arrays|rewrite handling code|config pattern"vp test run tests/deploy.test.ts -t "next.config.js custom headers|next.config.js redirects|next.config.js rewrites|basePath stripping"vp test run tests/request-pipeline.test.ts tests/deploy.test.tsvp test run tests/app-router.test.ts -t "custom headers from next.config.js|serves public files from the build output|serves public files under basePath|App Router next.config.js features"vp test run tests/entry-templates.test.tsvp fmt --check packages/vinext/src/server/request-pipeline.ts packages/vinext/src/entries/app-rsc-entry.ts packages/vinext/src/server/prod-server.ts packages/vinext/src/deploy.ts tests/request-pipeline.test.ts tests/app-router.test.ts tests/deploy.test.ts packages/vinext/package.jsonvp checkvp run vinext#build🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.