Skip to content
Draft
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: 3 additions & 1 deletion src/content/docs/workers/vite-plugin/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ pcx_content_type: overview
title: Vite plugin
sidebar:
order: 17
description: A full-featured integration between Vite and the Workers runtime
description: Integrate Vite and Vite+ with the Workers runtime using the Cloudflare Vite plugin.
products:
- workers
---
Expand All @@ -13,6 +13,8 @@ import { Render } from "~/components";
The Cloudflare Vite plugin enables a full-featured integration between [Vite](https://vite.dev/) and the [Workers runtime](/workers/runtime-apis/).
Your Worker code runs inside a local [`workerd`](https://github.com/cloudflare/workerd) process, which closely matches the runtime APIs and behavior of deployed Workers.

For new Workers and supported Vite-based apps, use [Vite+](/workers/vite-plugin/vite-plus/) for development, builds, formatting, linting, type checking, and testing.

<Render file="local-development-security" product="workers" />

## Features
Expand Down
25 changes: 25 additions & 0 deletions src/content/docs/workers/vite-plugin/vite-plus.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
title: Vite+ on Workers
description: Use Vite+ with the Cloudflare Vite plugin for new Workers and Vite-based apps, or adopt it in an existing project.
pcx_content_type: integration-guide
sidebar:
order: 3
products:
- workers
---

[Vite+](https://viteplus.dev/) combines Vite with formatting, linting, type checking, and testing. Use Vite+ with the [Cloudflare Vite plugin](/workers/vite-plugin/) for new Workers and supported Vite-based apps.

The plugin runs your Worker code in the Workers runtime during development. Vite+ provides the project toolchain through the `vp` command.

## Start a new project

To create a standalone Worker with `cf init`, follow [Deploy your first Worker](/cf/get-started/first-worker/). Use the generated Vite+ scripts for checks, formatting, and tests alongside `cf dev`, `cf build`, and `cf deploy`.

For a framework application, start with the appropriate [framework guide](/workers/framework-guides/). Preserve framework-specific build steps when adopting Vite+.

## Adopt Vite+ in an existing project

Follow the [Vite+ migration guide](https://viteplus.dev/guide/migrate) for requirements and migration steps. If your project does not yet use the Cloudflare Vite plugin, follow the [plugin setup guide](/workers/vite-plugin/get-started/).

Keep your framework scripts and Cloudflare deployment command. Adopting Vite+ does not require changing your Cloudflare configuration format. Preserve existing toolchains during unrelated changes.
Loading