unjs / unenv

🕊️ Convert javaScript code to be runtime agnostic
MIT License
383 stars 20 forks source link

fix: export named `fetch` from `node-fetch` polyfill #63

Closed danielroe closed 1 year ago

danielroe commented 1 year ago

🔗 Linked issue

❓ Type of change

📚 Description

This adds a named fetch export for compatibility with node-fetch-native: https://github.com/unjs/node-fetch-native/blob/main/src/index.ts#L12.

📝 Checklist

pi0 commented 1 year ago

Seems a nice addition btw we are not aliasing node-fetch-native itself (src). Wondering what was the original issue?

rvmourik commented 1 year ago

@danielroe do you know when there will be a tagged release with this commit? We encounter this error and it stops us from deploying our newly migrated Nuxt3 website to Cloudflare workers.

Thanks in advance 🙏

danielroe commented 1 year ago

You should now be able to benefit from this from v1.0.1 ❤️

rvmourik commented 1 year ago

You should now be able to benefit from this from v1.0.1 ❤️

Thanks, works perfectly.