github cloudflare/workers-sdk wrangler@4.27.0

Minor Changes

  • #9914 a24c9d8 Thanks @petebacondarwin! - Add support for loading local dev vars from .env files

    If there are no .dev.vars or .dev.vars.<environment> files, when running Wrangler or the Vite plugin in local development mode,
    they will now try to load additional local dev vars from .env, .env.local, .env.<environment> and .env.<environment>.local files.

    These loaded vars are only for local development and have no effect in production to the vars in a deployed Worker.
    Wrangler and Vite will continue to load .env files in order to configure themselves as a tool.

    Further details:

    • In vite build the local vars will be computed and stored in a .dev.vars file next to the compiled Worker code, so that vite preview can use them.
    • The wrangler types command will similarly read the .env files (if no .dev.vars files) in order to generate the Env interface.
    • If the CLOUDFLARE_LOAD_DEV_VARS_FROM_DOT_ENV environment variable is "false" then local dev variables will not be loaded from .env files.
    • If the CLOUDFLARE_INCLUDE_PROCESS_ENV environment variable is "true" then all the environment variables found on process.env will be included as local dev vars.
    • Wrangler (but not Vite plugin) also now supports the --env-file=<path/to/dotenv/file> global CLI option. This affects both loading .env to configure Wrangler the tool as well as loading local dev vars.

Patch Changes

  • #10051 0f7820e Thanks @nikitassharma! - Add support for custom instance limits for containers. For example, instead of
    having to use the preconfigured dev/standard/basic instance types, you can now
    set:

    instance_type: {
      vcpu: 1,
      memory_mib: 1024,
      disk_mb: 4000
    }
    

    This feature is currently only available to customers on an enterprise plan.

  • #10149 e9bb8d3 Thanks @vicb! - fix require("debug") in nodejs_compat mode

  • Updated dependencies [9b61f44]:

    • miniflare@4.20250730.0

Don't miss a new workers-sdk release

NewReleases is sending notifications on new releases.