INTEGRITY Cloudflare Docs

API

cloudflare()

The cloudflare plugin should be included in the Vite plugins array:

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

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

It accepts an optional PluginConfig parameter.

interface PluginConfig

interface AuxiliaryWorkerConfig

Auxiliary Workers require a configPath, a config option, or both. CLOUDFLARE_VITE_WRANGLER_CONFIG_PATH only applies to the entry Worker. Auxiliary Workers do not use this environment variable. If you use a config file for an auxiliary Worker, set configPath explicitly.