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

getting explicit polyfill doesn't seem to work after upgrade to v4 #171

Open
stopsopa opened this issue Aug 9, 2023 · 1 comment
Open

Comments

@stopsopa
Copy link

stopsopa commented Aug 9, 2023

I had a code like this executed in the browser via vite:

import fetchPolyfill from "cross-fetch";

and it was importing indeed the polyfilled version of the lib to fetchPolyfill

but after upgrade to v4 it no longer seems to work.

I can see clearly in the release note that new version seems to prioritizing native code but I need polyfilled version.

Is there any way to get polyfill?

I've tried also

import fetchPolyfill from "cross-fetch/polyfill";

... doesn't work either

@Kosai106
Copy link

Have you tried:

import 'cross-fetch/polyfill';

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

No branches or pull requests

2 participants