matthew-andrews / isomorphic-fetch

Isomorphic WHATWG Fetch API, for Node & Browserify
MIT License
6.95k stars 289 forks source link

Clarification on non-browserify integration #128

Open DullReferenceException opened 7 years ago

DullReferenceException commented 7 years ago

Given the description of this project:

Isomorphic WHATWG Fetch API, for Node & Browserify

It seems to imply it is incompatible with webpack. However, looking at the code here, there's this comment:

// Return that as the export for use in Webpack, Browserify etc.

...and I don't see anything that is explicitly Browserify-only here.

Has this been verified to work/not work with webpack bundles? It would be nice to call this out explicitly in the README.

JohanBjoerklund commented 7 years ago

I haven't tried it with webpack, but it does not work with rollup.

matthew-andrews commented 7 years ago

I think webpack should work, that's how we use(d) at the FT.

matthew-andrews commented 7 years ago

[didn't mean to close this, sorry!]

SirGordon commented 7 years ago

I'm using webpack and it doesnt work on old browsers that don't have fetch variable. Is there any workaround / fix / alternative? (or maybe I'm doing something wrong?)