Skip to content

chore: move to cf 1.0, Vite+ 1.x and drop Wrangler - #1

Merged
ascorbic merged 1 commit into
mainfrom
chore/cf-1-and-vite-plus-1
Oct 11, 2026
Merged

ascorbic merged 1 commit into
mainfrom
chore/cf-1-and-vite-plus-1

Conversation

@ascorbic

@ascorbic ascorbic commented Oct 9, 2026 •

Copy link
Copy Markdown
Owner

Changes

  • Dependencies: vite-plus 1.1.0, cf 1.0.0-beta.14, @cloudflare/vite-plugin 2.0 beta, TypeScript 7.0.2, @types/node 26.6.4, and miniflare 5.20261006.1-alpha (the version cf and the Vite plugin use).
  • Removed: wrangler, @cloudflare/vitest-plugin (it depends on Wrangler), and the direct vite/vitest devDependencies. Wrangler no longer appears in pnpm-lock.yaml.
  • Overrides: pnpm-workspace.yaml pins vite@* to @voidzero-dev/vite-plus-core@1.1.0 and vitest@* to 5.0.3 (from vp toolchain vitest).
  • Config: cloudflare.config.ts uses defineConfig({ worker: { ... } }) from cf/config. The Vite plugin no longer needs experimental.newConfig. The compatibility date is now 2026-10-06.
  • Types: worker-configuration.d.ts and test/env.d.ts are gone. cf workers types generates types into the gitignored .cloudflare/types/, on postinstall or with pnpm types. Tests have their own test/tsconfig.json with Node types.
  • Tests: tests now run in Node. test/global-setup.ts runs vp build, and test/harness.ts loads the built bundle into Miniflare. test/index.test.ts uses mf.dispatchFetch and keeps the same two assertions.
  • Scripts: deploy is now vp build && cf deploy --prebuilt, and there is a new types script. preview is gone. cf dev and cf build expect a vite binary that Vite+ doesn't ship, so dev and build still go through vp.
  • CI: voidzero-dev/setup-vp v1.21.1.
  • Docs: AGENTS.md and README.md are updated to match, including the template setup steps.

Why

  • The project no longer depends on Wrangler at all.
  • With Vite+ 1.x, the pnpm overrides are all that's needed to keep one Vite and one Vitest. There are no aliased devDependencies.
  • Tests exercise the built Worker in Miniflare, which is what actually gets deployed.

Checks

  • pnpm install: passes and generates .cloudflare/types/index.d.ts
  • pnpm check: passes with 0 errors and 1 warning (bindings is imported in cloudflare.config.ts but not used yet)
  • pnpm test: 2/2 pass
  • pnpm build: passes
  • cf deploy --prebuilt --dry-run: reads the 0.31 KiB build output
  • grep -c wrangler pnpm-lock.yaml: 0
  • pnpm dev: / returns the greeting and /api/hello returns {"hello":"world"} as JSON

@ascorbic
ascorbic merged commit c735a72 into main Oct 11, 2026
3 checks passed
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