Skip to content

Commit

Permalink
chore: enable node's experimental fetch flag (#1393)
Browse files Browse the repository at this point in the history
  • Loading branch information
threepointone committed Jul 4, 2022
1 parent ff2e7cb commit b36ef43
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
9 changes: 9 additions & 0 deletions .changeset/khaki-clocks-shop.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
"wrangler": patch
---

chore: enable node's experimental fetch flag

We'd previously had some funny behaviour with undici clashing with node's own fetch supporting classes, and had turned off node's fetch implementation. Recent updates to undici appear to have fixed the issue, so let's turn it back on.

Closes https://github.com/cloudflare/wrangler2/issues/834
3 changes: 0 additions & 3 deletions packages/wrangler/bin/wrangler.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,6 @@ Consider using a Node.js version manager such as https://volta.sh/ or https://gi
return spawn(
process.execPath,
[
...(semiver(process.versions.node, "18.0.0") >= 0
? ["--no-experimental-fetch"] // TODO: remove this when https://github.com/cloudflare/wrangler2/issues/834 is properly fixed
: []),
"--no-warnings",
"--experimental-vm-modules",
...process.execArgv,
Expand Down

0 comments on commit b36ef43

Please sign in to comment.