Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add isomorphic-unfetch package #12

Closed
wants to merge 2 commits into from
Closed

Conversation

matextrem
Copy link

This PR has the following changes:

  • Added isomorphic-unfetch to support both Browser and Node environments given the fact native fetch API is only available in browsers and Node versions >= 18.

Comment on lines +13 to +15
rollupOptions: {
external: ["isomorphic-unfetch"],
},
Copy link
Owner

@enzoferey enzoferey Feb 16, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome 👌🏻

However we also need for a wider compatibiliy:

Suggested change
rollupOptions: {
external: ["isomorphic-unfetch"],
},
rollupOptions: {
external: ["isomorphic-unfetch"],
output: {
globals: {
"isomorphic-unfetch": "fetch",
},
},
},

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, we are going to build it for now. It's not clear to me the best way to add it as an external dependency at the moment.

@enzoferey
Copy link
Owner

@matextrem as this is urgent and I can't modify your branch, opened #13.

@enzoferey enzoferey closed this Feb 16, 2023
@enzoferey enzoferey self-assigned this Jun 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants