sincecutoff.com
← all changes

wrangler deploy, versions upload, and preview upload source maps by default

Introduced 2026-10-13 · score 0.95

HOW TO USE IT

When deploying, uploading a version, or creating a preview and you want stack traces mapped to original source, leave `upload_source_maps` unset for Wrangler’s default map generation and upload. Set it to `true` for strict behavior or `false` to opt out; deploy and version upload also accept `--no-upload-source-maps`.

npx wrangler deploy
npx wrangler versions upload [PATH]
wrangler preview [<SCRIPT>] [OPTIONS]

WHY THIS HELPS

Deploy, upload a version, or preview a Worker and make logged stack traces point to the original source.

BEFORE THIS CHANGE

Previously, source map uploads required `upload_source_maps` to be set in config or via `--upload-source-maps`; setting it to `true` kept strict behavior.

REQUIREMENTS AND LIMITATIONS

  • Version: 4.150.0
  • upload_source_maps: Boolean Wrangler config key. Omit it for default generation and upload on deploy, version upload, and preview; set `true` for strict behavior or `false` to opt out.
  • --upload-source-maps: Boolean flag to include source maps when uploading a Worker; setting it to `true` retains strict behavior.
  • --no-upload-source-maps: Opts out of source map uploads for deploy and version upload.
  • [PATH]: Path to a Worker entry point or a directory of static assets for `versions upload`.
  • [<SCRIPT>]: Optional script argument for `wrangler preview`.
  • Prerequisite: For frameworks or custom builds, the build tool must generate source maps; Wrangler uploads maps from an existing build.
  • Prerequisite: The documented minimum Wrangler version for `versions upload` is 3.40.0.
  • In the default mode, unresolvable source maps are skipped rather than failing the upload.
  • `wrangler build --experimental-cf-build-output` includes source maps only when `upload_source_maps = true`.
  • `--no-upload-source-maps` is available for deploy and versions upload.

FIRST-PARTY EVIDENCE

Check the installed version and the source before using it. Entry JSON

Report a problem with this card