cross-fetch icon indicating copy to clipboard operation
cross-fetch copied to clipboard

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

Open SofianeDjellouli opened this issue 3 years ago • 0 comments

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').

SofianeDjellouli avatar Jan 27 '22 08:01 SofianeDjellouli