github cloudflare/workers-sdk @cloudflare/config@0.25.0

Minor Changes

  • #16175 d8b1fca Thanks @jamesopstad! - Allow Worker bindings to be included conditionally

    Binding entries set to false, null, or undefined are now omitted from env. Generated environment types make conditionally included bindings optional.

    export default defineConfig(({ mode }) => ({
      worker: {
        name: "my-worker",
        compatibilityDate: "2026-10-09",
        env: {
          PRODUCTION_KV:
            mode === "production" && bindings.kv({ id: "production-kv-id" }),
          STAGING_API_ORIGIN:
            mode === "staging"
              ? bindings.text("https://staging.example.com")
              : undefined,
        },
      },
    }));

Don't miss a new workers-sdk release

NewReleases is sending notifications on new releases.