Packages

@cloudflare/vite-plugin

1.70.1 · 19 Nov 2026MIT12.3M / weekRepositoryHomepagenpmAtom feed

Your version

1.39.0

26 May 2026Where it was published

1.70.1 is the newest release of 1.x.

In short

1 new2 internal

Release note

Minor Changes

  • Add assetsOnly (entry Worker) and devOnly (auxiliary Workers) options to the plugin config

    Both options accept a boolean or a function that returns a boolean. The function is evaluated lazily at build time, allowing frameworks to provide the value after initialization.

    Use assetsOnly on the entry Worker to skip building the Worker and instead emit an assets-only Wrangler config to the client output directory. This enables frameworks such as Astro to use the ssr environment during development but produce a fully static app for deployment.

    export default defineConfig({
      plugins: [
        cloudflare({
          assetsOnly: () => isStaticBuild,
        }),
      ],
    });

    Use devOnly on an auxiliary Worker to include it during vite dev but skip it at build time.

    export default defineConfig({
      plugins: [
        cloudflare({
          auxiliaryWorkers: [
            { configPath: "./dev-only-worker/wrangler.jsonc", devOnly: true },
          ],
        }),
      ],
    });

A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.