wrangler previews block accepts placement configuration
Introduced 2026-09-16 · score 0.92
HOW TO USE IT
When a Worker needs a Preview placement different from production, set `placement` inside the Wrangler `previews` block; this overrides top-level placement for Previews.
{"placement":{"region":"<provider>:<region>"},"previews":{"placement":{"mode":"smart"}}}WHY THIS HELPS
Configure a Worker’s Preview placement independently from its production placement.
REQUIREMENTS AND LIMITATIONS
- Version: 4.133.0
- previews.placement: Preview placement configuration; overrides top-level placement for Previews.
- placement.mode: Set to `"smart"` for automatic placement near back-end services.
- placement.region: Cloud region in `{provider}:{region}` format, such as `aws:us-east-1`.
- placement.host: Hostname and port for a single-homed layer 4 service.
- placement.hostname: Hostname for a single-homed layer 7 service.
- placement choice: `mode`, `region`, `host`, and `hostname` are mutually exclusive placement options.
- Prerequisite: Use a Wrangler configuration file. Deployable Workers require `name`, `main`, and `compatibility_date` (with `main` optional for assets-only Workers).
FIRST-PARTY EVIDENCE
- https://github.com/cloudflare/workers-sdk/releases/tag/wrangler%404.133.0
- https://developers.cloudflare.com/workers/previews/configuration/
- https://developers.cloudflare.com/workers/configuration/placement/
- https://developers.cloudflare.com/workers/wrangler/configuration/
Check the installed version and the source before using it. Entry JSON