The Cloudflare Vite plugin now supports programmatic configuration of Workers without a Wrangler configuration file. You can use the config option to define Worker settings directly in your Vite configuration, or to modify existing configuration loaded from a Wrangler config file. This is particularly useful when integrating with other build tools or frameworks, as it allows them to control Worker configuration without needing users to manage a separate config file.
The config option
The Vite plugin’s new config option accepts either a partial configuration object or a function that receives the current configuration and returns overrides. This option is applied after any config file is loaded, allowing the plugin to override specific values or define Worker configuration entirely in code.
Example usage
Setting config to an object to provide configuration values that merge with defaults and config file settings:
import { defineConfig } from "vite";import { cloudflare } from "@cloudflare/vite-plugin";
export default defineConfig({ plugins: [ cloudflare({ config: { name: "my-worker", compatibility_flags: ["nodejs_compat"], send_email: [ { name: "EMAIL", }, ], }, }), ],});Use a function to modify the existing configuration:
import { defineConfig } from "vite";import { cloudflare } from "@cloudflare/vite-plugin";export default defineConfig({ plugins: [ cloudflare({ config: (userConfig) => { delete userConfig.compatibility_flags; }, }), ],});Return an object with values to merge:
import { defineConfig } from "vite";import { cloudflare } from "@cloudflare/vite-plugin";
export default defineConfig({ plugins: [ cloudflare({ config: (userConfig) => { if (!userConfig.compatibility_flags.includes("no_nodejs_compat")) { return { compatibility_flags: ["nodejs_compat"] }; } }, }), ],});Auxiliary Workers
Auxiliary Workers also support the config option, enabling multi-Worker architectures without config files.
Define auxiliary Workers without config files using config inside the auxiliaryWorkers array:
import { defineConfig } from "vite";import { cloudflare } from "@cloudflare/vite-plugin";
export default defineConfig({ plugins: [ cloudflare({ config: { name: "entry-worker", main: "./src/entry.ts", services: [{ binding: "API", service: "api-worker" }], }, auxiliaryWorkers: [ { config: { name: "api-worker", main: "./src/api.ts", }, }, ], }), ],});For more details and examples, see Programmatic configuration.
Source: Cloudflare
Latest Posts
- GCP Release Notes: January 31, 2026

- Dynamics 365 Contact Center – Leverage Quality Evaluation Agent simulation to test & fine tune evaluation criteria [MC1225452]
![Dynamics 365 Contact Center - Leverage Quality Evaluation Agent simulation to test & fine tune evaluation criteria [MC1225452] 3 pexels lalesh 147640](data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==)
- Dynamics 365 Customer Service – Leverage Quality Evaluation Agent simulation to test & fine tune evaluation criteria [MC1225451]
![Dynamics 365 Customer Service - Leverage Quality Evaluation Agent simulation to test & fine tune evaluation criteria [MC1225451] 4 pexels minan1398 1313817](data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==)
- Dynamics 365 Contact Center – Quality Evaluation Agent Evaluation Criteria Extensibility [MC1225441]
![Dynamics 365 Contact Center - Quality Evaluation Agent Evaluation Criteria Extensibility [MC1225441] 5 pexels pixabay 277574](data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==)


![Dynamics 365 Contact Center - Leverage Quality Evaluation Agent simulation to test & fine tune evaluation criteria [MC1225452] 3 pexels lalesh 147640](https://mwpro.co.uk/wp-content/uploads/2025/06/pexels-lalesh-147640-150x150.webp)
![Dynamics 365 Customer Service - Leverage Quality Evaluation Agent simulation to test & fine tune evaluation criteria [MC1225451] 4 pexels minan1398 1313817](https://mwpro.co.uk/wp-content/uploads/2024/08/pexels-minan1398-1313817-150x150.webp)
![Dynamics 365 Contact Center - Quality Evaluation Agent Evaluation Criteria Extensibility [MC1225441] 5 pexels pixabay 277574](https://mwpro.co.uk/wp-content/uploads/2024/08/pexels-pixabay-277574-150x150.webp)
