Skip to content

Commit

Permalink
Initial --experimental-local implementation using Miniflare 3 (#1894)
Browse files Browse the repository at this point in the history
* Initial `--experimental-local` implementation using Miniflare 3

* replace miniflare dynamic import with npx-import

* Update packages/wrangler/src/dev.tsx

Co-authored-by: Somhairle MacLeòid <samuel@macleod.space>

* Rename `experimentalMiniflare3` to `experimentalLocal`

* Remove reference to undefined `demandOneOfOption`

* Stub `caches` implementation when using `--experimental-local`

`workerd` currently throws on any use of the Cache API. Workers Sites
requires the Cache API to function though, so stub it out to no-ops,
like in regular `wrangler dev`.

* Ignore errors when cleaning up experimental local ref

These should've been caught/logged earlier.

* Add changeset

* Fix type errors

Co-authored-by: Cameron Robey <cameron@cameronrobey.co.uk>
Co-authored-by: Somhairle MacLeòid <samuel@macleod.space>
  • Loading branch information
3 people committed Sep 27, 2022
1 parent 5043b0b commit ed646cf
Show file tree
Hide file tree
Showing 12 changed files with 440 additions and 14 deletions.
7 changes: 7 additions & 0 deletions .changeset/short-candles-give.md
@@ -0,0 +1,7 @@
---
"wrangler": patch
---

Add experimental support for using the open-source Workers runtime [`workerd`](https://github.com/cloudflare/workerd) in `wrangler dev`.
Use `wrangler dev --experimental-local` to try it out! 🚀
Note this feature is still under active development.

0 comments on commit ed646cf

Please sign in to comment.