mirror of
https://github.com/cloudflare/vinext.git
synced 2026-05-09 08:25:34 +02:00
[PR #358] [MERGED] fix: fail build when cloudflare() plugin is missing #507
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#507
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/358
Author: @Divkix
Created: 3/8/2026
Status: ✅ Merged
Merged: 3/8/2026
Merged by: @james-elicx
Base:
main← Head:fix/fail-missing-cloudflare-plugin📝 Commits (3)
4430290fix: fail build when cloudflare() plugin is missingb043273refactor: extract shared utilities for cloudflare plugin guard9e5685fUpdate packages/vinext/src/deploy.ts📊 Changes
3 files changed (+128 additions, -23 deletions)
View changed files
📝
packages/vinext/src/deploy.ts(+45 -23)📝
packages/vinext/src/index.ts(+18 -0)📝
tests/deploy.test.ts(+65 -0)📄 Description
Summary
console.warnto a hardthrowindeploy.tswhen the user'svite.config.tsis missing@cloudflare/vite-pluginconfigResolvedhook: if a wrangler config file exists butcloudflare()is not registered, the build fails with an actionable error messagePreviously, forgetting
cloudflare()produced a crypticcould not resolve virtual:vinext-rsc-entryerror deep in wrangler's esbuild. Now the build fails early with a clear message showing exactly what to add.Closes #325
Test plan
tests/deploy.test.tspasses (182 tests)tests/build-optimization.test.tspasses (60 tests)🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.