The README should document how to use node-fetch in a polyfill fashion, perhaps with a Webpack exemple that shows how to load whatwg-fetch or node-fetch conditionally. This is not something obvious as node-fetch might actually need to be patched to act in a polyfill fashion vs. a simple ProvidePlugin, which would fail with external node_modules not processed by Webpack for example.
This will work properly with isomorphic-fetch because it polyfills, but I have not yet found a proper way to do it with Webpack.
node-fetch might possibly need to be updated to provide something like import 'node-fetch/polyfill so that it can be used in a truly isomorphic fashion.
node-fetch is not trying to be isomorphic, while isomorphic-fetch is, it would be much better to provide such info on isomorphic-fetch readme.
Yes, that make sense. The isomorphic question aside, node-fetch should probably provide a polyfill functionality, so it can be used with libraries that depend on fetch being available as a global.
I am closing this as decision is still to leave polyfilling to isomorphic-fetch (or you can write your simple module to expose node-fetch to global)
Most helpful comment
Yes, that make sense. The isomorphic question aside,
node-fetchshould probably provide a polyfill functionality, so it can be used with libraries that depend onfetchbeing available as a global.