lquixada / cross-fetch

Universal WHATWG Fetch API for Node, Browsers and React Native.
MIT License
1.67k stars 104 forks source link

Webpack warning: "export 'default' (imported as 'fetch') was not found in 'cross-fetch' #127

Open SofianeDjellouli opened 2 years ago

SofianeDjellouli commented 2 years ago

Hi,

When I try to import the default export of cross-fetch I get this warning from Webpack:

"export 'default' (imported as 'fetch') was not found in 'cross-fetch'

I get the same kind of warning when trying to import the named import "fetch".

After that I get this error on the browser:

ReferenceError: exports is not defined

However, it works as a polyfill (import 'cross-fetch/polyfill').