Skip to content

Commit

Permalink
Merge pull request #17 from robertknight/browserify-fix
Browse files Browse the repository at this point in the history
Fix module exports from Webpack / Browserify
  • Loading branch information
matthew-andrews committed Apr 6, 2015
2 parents c84e497 + 99ba3b1 commit 1bb628e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
7 changes: 6 additions & 1 deletion npm-client.js
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
module.exports = require('whatwg-fetch');
// the whatwg-fetch polyfill installs the fetch() function
// on the global object (window or self)
//
// Return that as the export for use in Webpack, Browserify etc.
require('whatwg-fetch');
module.exports = self.fetch;
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@
},
"repository": {
"type": "git",
"url": "git://github.com/matthew-andrews/node-fetch.git"
"url": "https://github.com/matthew-andrews/isomorphic-fetch.git"
},
"author": "Matt Andrews <matt@mattandre.ws>",
"license": "MIT",
"bugs": {
"url": "https://github.com/matthew-andrews/node-fetch/issues"
"url": "https://github.com/matthew-andrews/isomorphic-fetch/issues"
},
"homepage": "https://github.com/matthew-andrews/node-fetch",
"homepage": "https://github.com/matthew-andrews/isomorphic-fetch/issues",
"dependencies": {
"node-fetch": "^1.0.1",
"whatwg-fetch": "matthew-andrews/fetch#ie9"
Expand Down

0 comments on commit 1bb628e

Please sign in to comment.