github cloudflare/workers-sdk @cloudflare/vite-plugin@2.0.0-rc.3

Minor Changes

  • #17034 8712fc5 Thanks @petebacondarwin! - Add an experimental opt-in to trust Vite's allowed hosts for Local Explorer

    Set X_LOCAL_EXPLORER_USE_VITE_ALLOWED_HOSTS=true to trust resolved server.allowedHosts and preview.allowedHosts entries for Local Explorer APIs and other /cdn-cgi/ endpoints. Exact hostnames, suffix entries such as .example.com, and tunnel hostnames are supported. The environment variable defaults to false, keeping Vite's allowed hosts separate from Miniflare's allowlist. Setting Vite's allowedHosts: true keeps Miniflare's default protections enabled, even with the opt-in enabled.

Patch Changes

  • #17031 95fd4c2 Thanks @dependabot! - Update DEFAULT_COMPAT_DATE to 2026-11-19

    Use the bundled workerd release's compatibility date by default when scaffolding new projects or when no compatibility date is configured.

  • #17076 2ace09b Thanks @petebacondarwin! - Avoid loading Miniflare during bundle-only Vite builds

    The plugin now loads Miniflare when it needs the local runtime, such as for development, preview, or regenerating runtime types. Builds that only bundle Workers and assets no longer pay the cost of loading Miniflare.

  • #16385 ed3e5e7 Thanks @aryasaatvik! - Keep deferred imports alive after their originating request ends

    Retain the module runner's RPC operation until its result is retrieved and cleaned up. This prevents subsequent requests from hanging on a cached import when the first request returns early or its client disconnects.

  • #17030 f3f7bbc Thanks @cpojer! - Stop running Docker at the end of builds for projects with no Containers

    Builds that write the Build Output Specification ran docker image ls on every build to find image tags left by a previous build, even when the project configured no Containers. On a machine with Docker installed this added about a quarter of a second to each build, and the build waited on the Docker CLI for as long as it took to respond. The lookup is now skipped when the project has no Containers and the build output being replaced had none either. Projects that configure Containers, and the first build after the last Container is removed, still remove previous tags as before.

  • #17035 1b563db Thanks @petebacondarwin! - Fix remote bindings authentication with API tokens scoped to an individual Worker

    Remote bindings now create preview sessions through the Worker-scoped endpoint. When the response includes a usable exchange URL, its hostname is used without account-wide Workers subdomain access; otherwise, the existing account subdomain lookup or registration is used. This applies to getPlatformProxy and remote bindings in Wrangler, the Cloudflare Vite plugin, and the Vitest integration. Tokens still need permission to update the named Worker.

  • Updated dependencies [8712fc5, 95fd4c2, 95fd4c2, be6aa81, 8f45554, 4f5b118, 8f45554]:

Don't miss a new workers-sdk release

NewReleases is sending notifications on new releases.