fetch not defined in Safari (ReferenceError: Can't find variable: fetch)
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']
}