Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/content/docs/cf/ci.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ pushes to `main`.
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version: 22
node-version: 24
cache: npm
- run: npm ci
- run: npx cf build
Expand Down Expand Up @@ -123,7 +123,7 @@ each command to the project's copy. Collaborators, coding agents, and CI then
run the same version. One-off runs such as `npx cf@<VERSION>` are not handed
off.

Use Node.js 22.18 or later. For details, refer to
Use a supported Node.js release, such as Node.js 24.22 or later in Node.js 24. For details, refer to
[Requirements](/cf/get-started/#requirements).

## Understand non-interactive behavior
Expand Down
8 changes: 7 additions & 1 deletion src/content/docs/cf/get-started/first-worker.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -48,21 +48,27 @@ these files:
- index.d.ts
- src/
- index.ts
- test/
- index.test.ts
- .gitignore
- cloudflare.config.ts
- package.json
- tsconfig.json
- vite.config.ts
- vitest.config.ts
</FileTree>

- `src/index.ts` is the Worker.
- `cloudflare.config.ts` describes the Worker in TypeScript.
- `vite.config.ts` adds the [Cloudflare Vite plugin](/workers/vite-plugin/),
- `vite.config.ts` configures [Vite+](https://viteplus.dev) checks and adds the [Cloudflare Vite plugin](/workers/vite-plugin/),
which runs your code in the Workers runtime during development and builds
it for deployment.
- `package.json` has `dev`, `build`, and `deploy` scripts that run the
matching `cf` commands. It lists `cf` and the Vite plugin 2.0 beta
(`@cloudflare/vite-plugin@beta`), which `cf` uses, but not Wrangler.
It also installs Vite+ locally for checks, formatting, and tests.
- `vitest.config.ts` configures tests to run in the Workers runtime.
`test/index.test.ts` checks the Worker response using its `WORLD` binding.
- `.cloudflare/types/index.d.ts` holds generated binding and runtime types. The
Vite plugin updates it when you run `cf dev` or `cf build`. The generated
`.gitignore` excludes `.cloudflare/`.
Expand Down
2 changes: 1 addition & 1 deletion src/content/docs/cf/get-started/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ chooses credentials, accounts, and zones.

- A Cloudflare account. If you do not have one,
[sign up](https://dash.cloudflare.com/sign-up).
- Node.js 22.18 or later. Bun is not supported. When `cf` runs on Bun, commands
- Node.js 22.23+, 24.22+, or 26.12+. Bun is not supported. When `cf` runs on Bun, commands
that load `cloudflare.config.ts` fail.

## Install `cf`
Expand Down
16 changes: 16 additions & 0 deletions src/content/docs/workers/vite-plugin/get-started.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -97,3 +97,19 @@ A request to this Worker will return **'Running in Cloudflare-Workers!'**, demon
## Dev, build, preview and deploy

You can now start the Vite development server (`npm run dev`), build the application (`npm run build`), preview the built application (`npm run preview`), and deploy to Cloudflare (`npm run deploy`).

## Use Vite+

[Vite+](https://viteplus.dev) combines Vite with formatting, linting, type
checking, and testing. The Cloudflare Vite plugin also works with Vite+.

For an existing project, follow the [Vite+ migration guide](https://viteplus.dev/guide/migrate).
Keep the Vite alias and Vitest override aligned with your Vite+ release.
Use `defineConfig` from `vite-plus` in your Vite configuration.

Keep your framework's scripts and Cloudflare deployment command. For example,
`vp run build` runs a project's `build` script, while `vp build` runs Vite
without additional steps from that script. Adopting Vite+ does not require
converting a Wrangler configuration to `cloudflare.config.ts`.

For a new project with `cf`, follow [Deploy your first Worker](/cf/get-started/first-worker/).
Loading