Skip to content

@cloudflare/config@0.25.0

Choose a tag to compare

@workers-devprod workers-devprod released this 13 Oct 09:35
· 80 commits to main since this release
fb3d9c8

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,
        },
      },
    }));