API · Cloudflare Workers docs | Latest TMZ Celebrity News & Gossip | Watch TMZ Live Skip to content
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

  • configPath string optional

    An optional path to your Worker config file. By default, a wrangler.jsonc, wrangler.json, or wrangler.toml file in the root of your application will be used as the Worker config.

    For more information about the Worker configuration, see Configuration.

  • viteEnvironment { name?: string } optional

    Optional Vite environment options. By default, the environment name is the Worker name with - characters replaced with _. Setting the name here will override this. A typical use case is setting viteEnvironment: { name: "ssr" } to apply the Worker to the SSR environment.

    See Vite Environments for more information.

  • persistState boolean | { path: string } optional

    An optional override for state persistence. By default, state is persisted to .wrangler/state. A custom path can be provided or, alternatively, persistence can be disabled by setting the value to false.

  • inspectorPort number | false optional

    An optional override for debugging your Workers. By default, the debugging inspector is enabled and listens on port 9229. A custom port can be provided or, alternatively, setting this to false will disable the debugging inspector.

    See Debugging for more information.

  • auxiliaryWorkers Array<AuxiliaryWorkerConfig> optional

    An optional array of auxiliary Workers. Auxiliary Workers are additional Workers that are used as part of your application. You can use service bindings to call auxiliary Workers from your main (entry) Worker. All requests are routed through your entry Worker. During the build, each Worker is output to a separate subdirectory of dist.

interface AuxiliaryWorkerConfig

  • configPath string

    A required path to your Worker config file.

    For more information about the Worker configuration, see Configuration.

  • viteEnvironment { name?: string } optional

    Optional Vite environment options. By default, the environment name is the Worker name with - characters replaced with _. Setting the name here will override this.

    See Vite Environments for more information.

TMZ Celebrity News – Breaking Stories, Videos & Gossip

Looking for the latest TMZ celebrity news? You've come to the right place. From shocking Hollywood scandals to exclusive videos, TMZ delivers it all in real time.

Whether it’s a red carpet slip-up, a viral paparazzi moment, or a legal drama involving your favorite stars, TMZ news is always first to break the story. Stay in the loop with daily updates, insider tips, and jaw-dropping photos.

🎥 Watch TMZ Live

TMZ Live brings you daily celebrity news and interviews straight from the TMZ newsroom. Don’t miss a beat—watch now and see what’s trending in Hollywood.