diff --git a/client.js b/client.js index 62ddf0d..557a2fe 100644 --- a/client.js +++ b/client.js @@ -1 +1 @@ -require('fetch'); +module.exports = require('fetch'); diff --git a/npm-client.js b/npm-client.js index 72f1b48..48d1742 100644 --- a/npm-client.js +++ b/npm-client.js @@ -1 +1 @@ -require('whatwg-fetch'); +module.exports = require('whatwg-fetch'); diff --git a/server.js b/server.js index 0581573..6400a40 100644 --- a/server.js +++ b/server.js @@ -8,7 +8,7 @@ global.Headers = global.self.Headers; global.Request = global.self.Request; global.Response = global.self.Response; var realFetch = global.self.fetch; -global.fetch = function(url, options) { +module.exports = global.fetch = function(url, options) { if (/^\/\//.test(url)) { url = 'https:' + url; }