Skip to content

Commit

Permalink
switch to isomorphic-fetch
Browse files Browse the repository at this point in the history
  • Loading branch information
lacymorrow committed Feb 17, 2020
1 parent 90a3b81 commit bd9544f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
'use strict';

( function ( root, cx ) {
const fetch = require('isomorphic-fetch')

if ( typeof define === 'function' && define.amd ) {
console.log('A')
// AMD
define( ['fetch'], cx )
define( [fetch], cx )

} else if ( typeof exports === 'object' ) {
console.log('B')

// Node, CommonJS-like
module.exports = cx( require( 'node-fetch' ) )
module.exports = cx( fetch )

} else {
console.log('C')
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"eslint": "^4.18.1"
},
"dependencies": {
"node-fetch": "^2.0.0"
"isomorphic-fetch": "^2.2.1"
},
"xo": {
"esnext": true
Expand Down

0 comments on commit bd9544f

Please sign in to comment.