diff --git a/config/webpack.config.backend.js b/config/webpack.config.backend.js index e9c2c28..0e72af6 100644 --- a/config/webpack.config.backend.js +++ b/config/webpack.config.backend.js @@ -75,9 +75,5 @@ module.exports = { process.env.NODE_ENV || "development" ), }), - // See: - // - https://github.com/andris9/encoding/issues/16 (the culprit) - // - https://github.com/bitinn/node-fetch/issues/41 (the solution) - new webpack.IgnorePlugin(/\/iconv-loader$/), ], }; diff --git a/package.json b/package.json index 9d51d72..56d4f02 100644 --- a/package.json +++ b/package.json @@ -29,11 +29,11 @@ "fs-extra": "3.0.1", "html-webpack-plugin": "2.29.0", "husky": "^0.14.3", + "isomorphic-fetch": "^2.2.1", "jest": "20.0.4", "json-stable-stringify": "^1.0.1", "lint-staged": "^6.1.1", "lodash.isequal": "^4.5.0", - "node-fetch": "^2.1.1", "object-assign": "4.1.1", "postcss-flexbugs-fixes": "3.2.0", "postcss-loader": "2.0.8", diff --git a/src/plugins/github/fetchGitHubRepo.js b/src/plugins/github/fetchGitHubRepo.js index e3a46f4..2c79352 100644 --- a/src/plugins/github/fetchGitHubRepo.js +++ b/src/plugins/github/fetchGitHubRepo.js @@ -4,7 +4,7 @@ * docstring of the default export for more details. */ -import fetch from "node-fetch"; +import fetch from "isomorphic-fetch"; /** * Scrape data from a GitHub repo using the GitHub API. diff --git a/yarn.lock b/yarn.lock index 2bad75e..b2f87b6 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3551,7 +3551,7 @@ isobject@^2.0.0: dependencies: isarray "1.0.0" -isomorphic-fetch@^2.1.1: +isomorphic-fetch@^2.1.1, isomorphic-fetch@^2.2.1: version "2.2.1" resolved "https://registry.yarnpkg.com/isomorphic-fetch/-/isomorphic-fetch-2.2.1.tgz#611ae1acf14f5e81f729507472819fe9733558a9" dependencies: @@ -4466,10 +4466,6 @@ node-fetch@^1.0.1: encoding "^0.1.11" is-stream "^1.0.1" -node-fetch@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.1.1.tgz#369ca70b82f50c86496104a6c776d274f4e4a2d4" - node-forge@0.7.1: version "0.7.1" resolved "https://registry.yarnpkg.com/node-forge/-/node-forge-0.7.1.tgz#9da611ea08982f4b94206b3beb4cc9665f20c300"