diff --git a/src/content/docs/workers/vite-plugin/index.mdx b/src/content/docs/workers/vite-plugin/index.mdx index d7482b45a44..2c8775252ba 100644 --- a/src/content/docs/workers/vite-plugin/index.mdx +++ b/src/content/docs/workers/vite-plugin/index.mdx @@ -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 --- @@ -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. + ## Features diff --git a/src/content/docs/workers/vite-plugin/vite-plus.mdx b/src/content/docs/workers/vite-plugin/vite-plus.mdx new file mode 100644 index 00000000000..791ea691ead --- /dev/null +++ b/src/content/docs/workers/vite-plugin/vite-plus.mdx @@ -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.