Repository navigation
feat(init): use Vite+ for new Worker projects - #446
irvinebroque wants to merge 10 commits into
Conversation
commit: |
|
| mean | stddev | min | max | |
|---|---|---|---|---|
| PR | 224.0 ms | 3.4 ms | 217.0 ms | 231.9 ms |
| base | 223.5 ms | 3.8 ms | 215.5 ms | 230.0 ms |
Δ (PR vs base): — +0.4 ms (+0.2%)
Measured with hyperfine on ubuntu-latest (3 warmup runs, 20 timed runs). CI numbers carry ±a few ms of runner jitter; treat small deltas as noise.
|
LGTM |
|
LGTM! |
|
LGTM |
|
LGTM |
|
@irvinebroque Bonk workflow was cancelled. View workflow run · To retry, trigger Bonk again. |
|
Review: 1 findings. Posted 1 inline finding. |
|
No new concerns since the last review |
|
💬 Approved with comments — No new issues in the pin bump. Two INFO notes remain open: replace the autoconfig preview before publishing, as the description already says, and update a stale comment in vinext.ts. Findings: 2 info The decision is advisory: this comment never approves, blocks or requests changes on the pull request. 🚀 Release: 💬 1 infoThe autoconfig release prerequisite is still open Recommendation: 💬 Optional Nits
View full reviewRisk: Medium. The
📝 Documentation: 💬 1 infoOne code comment in vinext.ts is still out of date Recommendation: 💬 Optional Nits
View full review
✅ All other checks passed🔒 Security: ✅ LGTMThe preview 📖 AGENTS.md: ✅ LGTMNo AGENTS.md concerns. 📋 Code Quality: ✅ LGTM
⚡ Performance: ✅ LGTMNo performance concerns. Reviewed commit: |
Merge prerequisite: cloudflare/workers-sdk#16588 must land and be released, then replace the commit-pinned
@cloudflare/autoconfigpreview with that release and remove the two preview-only shared-package overrides inpnpm-workspace.yaml. The published 0.8.3 package does not contain Vite+ command detection; this PR currently uses the verified preview from workers-sdk commit147a75ae1bc58b81206dee52d4c795ff2a5686cd.cf initnow creates Worker projects with Vite+ installed locally and these scripts:{ "dev": "cf dev", "build": "cf build", "deploy": "cf deploy", "check": "cf workers types && vp check", "format": "vp fmt", "test": "vp test", "typecheck": "cf workers types && vp check --no-fmt --no-lint" }checkcovers formatting, type-aware linting, and type checking. The starter includes a Workers-runtime test that checks for HTTP 200 andHello World!using the configured binding.Vite+ command detection is provided by
@cloudflare/autoconfig, which selectsvp dev/vp buildwhile preserving framework and custom scripts. Package-manager overrides keep plugins on matching Vite and Vitest versions with npm, pnpm, Yarn, and Bun. Yarn starters include.yarnrc.ymlwithnodeLinker: node-modules, as required by Vite+. Vinext command overrides also selectvpwhen the project declares Vite+.Validation: the full root
pnpm checkand 80 focused tests pass, including command detection against the installed autoconfig preview and vinext projects with and without Vite+.Related PRs
Landing order:
@cloudflare/autoconfigrelease containing Vite+ command detection.@cloudflare/autoconfigto that published release, then merge and publishcf.cfrelease is available, so the documentedcf initdefaults match the released CLI.Independent: cloudflare/templates#1176 can land at any point. Its starters invoke Vite+ directly and do not depend on the autoconfig change or a new
cfrelease.