Skip to content

Instantly share code, notes, and snippets.

@generalpiston
Created February 21, 2018 16:55
Show Gist options
  • Save generalpiston/47f056d56799a94b0eb8fbacf012a4f0 to your computer and use it in GitHub Desktop.
Save generalpiston/47f056d56799a94b0eb8fbacf012a4f0 to your computer and use it in GitHub Desktop.
// the whatwg-fetch polyfill installs the fetch() function
// on the global object (window or global)
//
// Return that as the export for use in Webpack, Browserify etc.
require('whatwg-fetch');
module.exports = self.fetch.bind(self);
`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment