Skip to content

Commit 1bb628e

Browse files
Merge pull request #17 from robertknight/browserify-fix
Fix module exports from Webpack / Browserify
2 parents c84e497 + 99ba3b1 commit 1bb628e

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

npm-client.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,6 @@
1-
module.exports = require('whatwg-fetch');
1+
// the whatwg-fetch polyfill installs the fetch() function
2+
// on the global object (window or self)
3+
//
4+
// Return that as the export for use in Webpack, Browserify etc.
5+
require('whatwg-fetch');
6+
module.exports = self.fetch;

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@
1010
},
1111
"repository": {
1212
"type": "git",
13-
"url": "git://github.com/matthew-andrews/node-fetch.git"
13+
"url": "https://github.com/matthew-andrews/isomorphic-fetch.git"
1414
},
1515
"author": "Matt Andrews <matt@mattandre.ws>",
1616
"license": "MIT",
1717
"bugs": {
18-
"url": "https://github.com/matthew-andrews/node-fetch/issues"
18+
"url": "https://github.com/matthew-andrews/isomorphic-fetch/issues"
1919
},
20-
"homepage": "https://github.com/matthew-andrews/node-fetch",
20+
"homepage": "https://github.com/matthew-andrews/isomorphic-fetch/issues",
2121
"dependencies": {
2222
"node-fetch": "^1.0.1",
2323
"whatwg-fetch": "matthew-andrews/fetch#ie9"

0 commit comments

Comments
 (0)