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

Conditionally import cross-fetch with polyfill - Issue #197 #198

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

taylorkle
Copy link

@taylorkle taylorkle commented Oct 27, 2023

Allow developers to conditionally import the optional polyfill with the cross-fetch package to address issue 197 #197

It is unclear if the entire package cross-fetch with ponyfill caused the issue or the use of polyfill alone, but we could consider testing with disabled polyfill first. The polyfill is only applied in the absence of global fetch.

@taylorkle taylorkle marked this pull request as ready for review October 31, 2023 15:57
@jpowers
Copy link
Member

jpowers commented Nov 1, 2023

Looks good and will work, but I think we could probably just remove the polyfill and allow users who need it to load it. This blog post suggests that as well.

https://www.builder.io/blog/stop-polyfilling-fetch-in-your-npm-package

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