What’s new
wrangler
2.0 introduces a number of new features for developing and deploying a Worker. This document is to show previous users of wrangler 1.x what they can expect when they move to wrangler
v2.
wrangler.toml
isn’t mandatorydev
and publish
accept cli argumentstail
can be run on arbitrary script namesinit
creates project boilerplate- service environments
- json bindings for vars
- local mode for
wrangler dev
- module system (for both modules and service worker format workers)
- devtools
- typescript support ootb
- sharing dev environment on the internet
- wider platform compat
- dev hotkeys
- better config validation
Wrangler 1.0 and 2.0 comparison table
Commands
Command | 1.x | 2.0 | Notes |
---|
publish | ✅ | ✅ | |
dev | ✅ | ✅ | |
preview | ✅ | ❌ | Removed, use dev instead. |
init | ✅ | ✅ | |
generate | ✅ | ❌ | Removed, use git clone instead. |
build | ✅ | ❌ | Removed, invoke your own build script instead. |
secret | ✅ | ✅ | |
route | ✅ | ❌ | Removed, use publish instead. |
tail | ✅ | ✅ | |
kv | ✅ | ✅ | |
r2 | 🚧 | ✅ | Introduced in wrangler 1.19.8. |
pages | ❌ | ✅ | |
config | ✅ | ❔ | |
login | ✅ | ✅ | |
logout | ✅ | ✅ | |
whoami | ✅ | ✅ | |
subdomain | ✅ | ❔ | |
report | ✅ | ❌ | Removed, error reports are made interactively. |
Configuration
Features