Universal WHATWG Fetch API polyfill for Node.js and browsers including IE8. Version 1.0.0 (latest). This package adds a global `fetch` function, built on top of GitHub's fetch polyfill. It requires an ES6 Promise polyfill (e.g., es6-promise) and does not bundle one. It is designed for use with bundlers like Webpack or Browserify. Compared to isomorphic-fetch, it adds IE8 support but has been largely superseded by native fetch and modern polyfills like whatwg-fetch.
npm install universal-fetchNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows global fetch usage after requiring both es6-promise polyfill and universal-fetch side-effect import.
Replace with whatwg-fetch for browsers and native fetch in Node 18+.
Install es6-promise and call polyfill() before loading universal-fetch.
Use side-effect import only: import 'universal-fetch'; then use global fetch.
Install @types/whatwg-fetch or declare 'declare var fetch: typeof globalThis.fetch;'
Ensure es6-promise polyfill is called before importing universal-fetch, and that the side-effect import is present.
Run: npm install universal-fetch es6-promise
Check the URL and CORS headers. Ensure universal-fetch is loaded as polyfill.
No dependency data recorded yet.