Skip to content

Commit

Permalink
fixup! Prioritise workerd condition when bundling
Browse files Browse the repository at this point in the history
  • Loading branch information
mrbbot committed Jan 27, 2023
1 parent d86bd4a commit 360bf76
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .changeset/chilly-donuts-fetch.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
Prefer the `workerd` `exports` condition when bundling.

This can be used to build isomorphic libraries that have different implementations depending on the JavaScript runtime they're running in.
When bundling, Wrangler will first try to load the [`workerd` key](https://runtime-keys.proposal.wintercg.org/#workerd), then `worker`, then `browser`.
`workerd` is the [standard key](https://runtime-keys.proposal.wintercg.org/#workerd) for the Cloudflare Workers runtime.
When bundling, Wrangler will try to load the [`workerd` key](https://runtime-keys.proposal.wintercg.org/#workerd).
This is the [standard key](https://runtime-keys.proposal.wintercg.org/#workerd) for the Cloudflare Workers runtime.
Learn more about the [conditional `exports` field here](https://nodejs.org/api/packages.html#conditional-exports).

0 comments on commit 360bf76

Please sign in to comment.