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

Implement isomorphic fetch #458

Closed
wants to merge 1 commit into from
Closed

Implement isomorphic fetch #458

wants to merge 1 commit into from

Conversation

safinsingh
Copy link

As stated in #456, this library seems to be for both the browser and Node.js; however, it uses node-fetch which is a request library specifically for Node because it uses modules not present in the browser. This PR implements an isomorphic fetch using cross-fetch so that it can properly run in the browser. It maintains the @types/node-fetch package as a dev dependency so that certain type casts still work.

@wolfy1339 wolfy1339 added the Type: Bug Something isn't working as documented label May 16, 2022
@gr2m
Copy link
Contributor

gr2m commented Sep 8, 2022

node-fetch should not be bundled for browser builds, a per https://github.com/node-fetch/node-fetch/blob/e218f8d5b7c6ad48b3a6c8e85bc65948ed295b26/package.json#L6. This library is usable in the browser today

@gr2m gr2m closed this Sep 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Something isn't working as documented
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants