For some reason fetch
(https://fetch.spec.whatwg.org/) is not defined in Safari (Version 9.0.3), does anyone know why? It seems to be the standard and works fine in
You can use https://github.com/github/fetch polyfill for unsupported browsers.
npm install whatwg-fetch --save;
Edit: (per the comments)
add
import 'whatwg-fetch';
in each file before using fetch – oliviergg
Use whatwg-fetch
polyfill.
If you use webpack
, you could just add it to entry point
entry: {
app: ['whatwg-fetch', 'your-index.js']
}