# @cloudflare/vite-plugin

> Cloudflare plugin for Vite

Latest version **1.69.0** (published 2026-11-11) · MIT license · 0 weekly downloads

## Install

```sh
npm install @cloudflare/vite-plugin
pnpm add @cloudflare/vite-plugin
yarn add @cloudflare/vite-plugin
bun add @cloudflare/vite-plugin
```

## Health

**Score 75/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; has provenance; recently updated; high maintenance score; high quality score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 1.69.0 |
| Published | 2026-11-11 |
| First published | 2025-01-20 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 5 |
| Unpacked size | 4.2 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 4634 |
| Maintainers | wrangler-publisher, cf-npm-publish |
| Keywords | cloudflare, cloudflare-workers, vite, vite-plugin, workers |

## Links

- npm: https://www.npmjs.com/package/@cloudflare/vite-plugin
- Repository: https://github.com/cloudflare/workers-sdk
- Homepage: https://github.com/cloudflare/workers-sdk/tree/vite-plugin-v1/packages/vite-plugin-cloudflare#readme
- Issues: https://github.com/cloudflare/workers-sdk/issues
- npm.io page: https://npm.io/package/@cloudflare/vite-plugin

## Dependencies (5)

- [ws](https://npm.io/package/ws.md) 8.22.0
- [unenv](https://npm.io/package/unenv.md) 2.0.0-rc.24
- [wrangler](https://npm.io/package/wrangler.md) 4.160.0
- [miniflare](https://npm.io/package/miniflare.md) 5.20261110.0-beta
- [@cloudflare/unenv-preset](https://npm.io/package/@cloudflare/unenv-preset.md) 2.16.2

## Alternatives

- [cron](https://npm.io/package/cron.md) — 4.9M weekly downloads
- [@vercel/queue](https://npm.io/package/@vercel/queue.md) — 731.6K weekly downloads
- [create-sonicjs](https://npm.io/package/create-sonicjs.md) — 1.6K weekly downloads
- [@exellix/jobs-api](https://npm.io/package/@exellix/jobs-api.md) — 941 weekly downloads
- [@forwardimpact/libskill](https://npm.io/package/@forwardimpact/libskill.md) — 575 weekly downloads

## Recent versions

- 1.69.0 (latest) — 2026-11-11
- 2.0.0-beta.v.15 (beta) — 2026-11-11
- 2.0.0-beta.v.14 — 2026-11-10
- 2.0.0-beta.v.13 — 2026-11-09
- 1.68.0 — 2026-11-09
- 2.0.0-beta.v.12 — 2026-11-05
- 2.0.0-beta.v.11 — 2026-11-03
- 2.0.0-beta.v.10 — 2026-11-02
- 1.67.0 — 2026-11-01
- 2.0.0-beta.v.9 — 2026-11-01
- 2.0.0-beta.v.8 — 2026-10-29
- 2.0.0-beta.v.7 — 2026-10-28
- 1.66.0 — 2026-10-28
- 2.0.0-beta.v.6 — 2026-10-27
- 2.0.0-beta.v.5 — 2026-10-26
- … 897 more at https://npm.io/package/@cloudflare/vite-plugin/versions

## README

# `@cloudflare/vite-plugin`

The Cloudflare Vite plugin enables a full-featured integration between [Vite](https://vite.dev/) and the [Workers runtime](https://developers.cloudflare.com/workers/runtime-apis/).
Your Worker code runs inside [workerd](https://github.com/cloudflare/workerd), matching the production behavior as closely as possible and providing confidence as you develop and deploy your applications.

```ts
// vite.config.ts

import { defineConfig } from "vite";
import { cloudflare } from "@cloudflare/vite-plugin";

export default defineConfig({
  plugins: [cloudflare()],
});
```

## Documentation

Full documentation can be found [here](https://developers.cloudflare.com/workers/vite-plugin/).

## Features

- Uses the Vite [Environment API](https://vite.dev/guide/api-environment) to integrate Vite with the Workers runtime
- Provides direct access to [Workers runtime APIs](https://developers.cloudflare.com/workers/runtime-apis/) and [bindings](https://developers.cloudflare.com/workers/runtime-apis/bindings/)
- Builds your front-end assets for deployment to Cloudflare, enabling you to build static sites, SPAs, and full-stack applications
- Official support for [TanStack Start](https://tanstack.com/start/) and [React Router v8](https://reactrouter.com/) with server-side rendering
- Leverages Vite's hot module replacement for consistently fast updates
- Supports `vite preview` for previewing your build output in the Workers runtime prior to deployment

## Use cases

- [TanStack Start](https://tanstack.com/start/)
- [React Router v8](https://reactrouter.com/)
- Support for more full-stack frameworks is coming soon
- Static sites, such as single-page applications, with or without an integrated backend API
- Standalone Workers
- Multi-Worker applications

---
_Source: https://npm.io/package/@cloudflare/vite-plugin · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
