I'm facing an issue with making my code compatible with Safari by using the GitHub Fetch Polyfill for fetch()
. I followed the documentation and installed it using:
$ npm install whatwg-fetch --save
Although I completed this step, I am unsure of how to actually utilize the fetch polyfill. I attempted the following without success:
var fetch = require('whatwg-fetch') // does not work
Could someone please guide me on the correct way to implement the fetch polyfill?
References: