Skip to content

feat(init): default Cloudflare projects to cf - #3504

Merged
james-elicx merged 4 commits into
mainfrom
codex/cf-default-init
Sep 27, 2026
Merged

james-elicx merged 4 commits into
mainfrom
codex/cf-default-init

Conversation

@james-elicx

@james-elicx james-elicx commented Sep 27, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Default both vinext init and create-vinext-app to cf, Cloudflare Vite plugin v2, cloudflare.config.ts, and Cloudflare Build Output.
  • Keep Wrangler initialization behind --legacy-wrangler-cloudflare-init, using Vite plugin v1. Existing Wrangler configs remain protected from implicit migration.
  • Remove --experimental-cf from help and option handling: it is silently ignored, including =false, and does not override the legacy flag or select a platform.
  • Replace Wrangler-first deployment/caching documentation with typed cf configuration examples, including service-binding and self-contained Response Store utilities, Workers Cache, and KV. Build Output is no longer described as experimental; cache-warming flags are unchanged.
  • Preserve explicit, separate Response Store deployment. No deployment orchestration changes.
  • Keep CI coverage for legacy init and switch the create-vinext-app build job to verify default cf output for both Workers.

Validation

  • 293 targeted tests passed across init, create, config, and build coverage.
  • Eight generated-project builds cover service-binding, self-contained, Workers Cache, and KV; docs show focused configuration snippets, not complete files.
  • Generated-project type-check and local service-binding preview passed.
  • Full apps/web production build passed, including docs and the Response Store Worker.
  • Package builds and targeted formatting, lint, and type checks passed.

Cloudflare-specific scaffolding and documentation changes only; no Next.js request/runtime behavior changes.

@pkg-pr-new

pkg-pr-new Bot commented Sep 27, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

@vinext/cloudflare

npm i https://pkg.pr.new/@vinext/cloudflare@3504

create-vinext-app

npm i https://pkg.pr.new/create-vinext-app@3504

@vinext/types

npm i https://pkg.pr.new/@vinext/types@3504

vinext

npm i https://pkg.pr.new/vinext@3504

@cloudflare/workers-response-store

npm i https://pkg.pr.new/@cloudflare/workers-response-store@3504

commit: 5fa7d3a

@github-actions

github-actions Bot commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor
Example Preview Production Original
app-router-cloudflare preview production
pages-router-cloudflare preview production
app-router-playground preview production original
realworld-api-rest preview production
nextra-docs-template preview production
benchmarks preview production
hackernews preview production original
response-store-demo preview production
workers-cache preview production
kv preview production
static-assets-cache preview production
static-export preview production
web preview production

@github-actions

Copy link
Copy Markdown
Contributor

Performance benchmarks

Compared aa9106d against base 1979d9c using alternating same-runner rounds. Next.js was unchanged and skipped.

0 improved · 0 regressed · 6 within ±1.5%

Scenario Framework Baseline Current Change
Client bundle size (gzip) vinext 142.3 KB 142.3 KB ⚫ -0.0%
Client entry size (gzip) vinext 130.4 KB 130.4 KB ⚫ -0.0%
Dev server cold start vinext 3.33 s 3.30 s ⚫ -0.8%
Production build time vinext 3.85 s 3.84 s ⚫ -0.2%
RSC entry closure size (gzip) vinext 128.2 KB 128.2 KB ⚫ -0.0%
Server bundle size (gzip) vinext 226.8 KB 226.8 KB ⚫ +0.0%

View detailed results and traces

🟢 improvement · 🔴 regression · ⚫ change below 1.5% · paired base/head

@james-elicx

Copy link
Copy Markdown
Member Author

/bigbonk review for issues

Please review the current head 624993b against main. Focus on correctness and unintended behavior changes in default cf initialization, explicit legacy Wrangler compatibility, the retired --experimental-cf no-op, and integration with the latest Static Assets, CSS Modules, and cache-warming changes. Check the Pages Router client-asset metadata output fix and whether the short documentation snippets match the implemented APIs. Look for missing regression coverage and unnecessary complexity.

Review only: do not modify code or deploy anything. Post actionable findings with file/line references, or explicitly state if you find none.

Time limit: 8 minutes. Complete the review and post all findings within that limit.

Comment thread packages/vinext/src/init-cloudflare.ts Resolved
Comment thread docs/caching.mdx Resolved
@ask-bonk

ask-bonk Bot commented Sep 27, 2026

Copy link
Copy Markdown
Contributor

Submitted 2 actionable inline findings.

github run

@james-elicx

Copy link
Copy Markdown
Member Author

/bigbonk review for issues

Please re-review the latest head 5fa7d3a against main and verify both previous findings are fixed. The generated App and Pages Router service-binding imports are now extensionless, with direct-init type-check regressions that failed with TS5097 before the fix and pass afterward without changing the user tsconfig. All affected docs now explicitly merge existing Worker exports with helper exports. All 344 focused tests, targeted checks, and the apps/web build passed.

Check for remaining actionable correctness, compatibility, documentation, or unnecessary-complexity issues across this PR. Review only: do not modify code or deploy anything. Post all actionable findings with file/line references, or explicitly state LGTM if none remain.

Time limit: 8 minutes. Complete the review and post all findings within that limit.

@ask-bonk

ask-bonk Bot commented Sep 27, 2026

Copy link
Copy Markdown
Contributor

LGTM!

github run

@james-elicx
james-elicx marked this pull request as ready for review September 27, 2026 22:59
@james-elicx
james-elicx merged commit 07c19bf into main Sep 27, 2026
87 checks passed
@james-elicx
james-elicx deleted the codex/cf-default-init branch September 27, 2026 23:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant