1
0

update migration

This commit is contained in:
2022-06-26 02:29:47 +02:00
parent 5c059cd015
commit 97c98feb79

View File

@@ -4,13 +4,29 @@ From `v1.x.x` to `v2.x.x`.
## Contents
- [Preparation](#preparation)
- [Update](#update)
- [Import / Require](#import--require)
- [Routes](#routes)
- [Fetch](#fetch--routerhandle)
## Preparation
Follow Cloudflare's [Migration Guide](https://developers.cloudflare.com/workers/wrangler/migration/migrating-from-wrangler-1/) to update your protject to [wrangler2](https://github.com/cloudflare/wrangler2).
## Update
Update to the latest version verstion
```bash
npm i -D @tsndr/cloudflare-worker-router
```
## Import / Require
Switch to ESModules.
### Before
```javascript