From 86b2e3d1be11d63b8920427659c3875c6f7fe0cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Devos?= Date: Tue, 18 Feb 2020 14:27:41 +0100 Subject: [PATCH] fix(fetch) polyfill fails SSR https://github.com/github/fetch/issues/657 --- package.json | 2 +- src/package/index.js | 3 +-- yarn.lock | 5 +++++ 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 6ee63d67f..742f08157 100644 --- a/package.json +++ b/package.json @@ -52,7 +52,7 @@ "respinner": "^3.0.2", "uuid": "^3.4.0", "values.js": "^1.0.3", - "whatwg-fetch": "^3.0.0", + "whatwg-fetch": "^2.0.4", "use-debounce": "^3.3.0", "yup": "^0.28.0" }, diff --git a/src/package/index.js b/src/package/index.js index 0cccdae8f..a6c59853b 100644 --- a/src/package/index.js +++ b/src/package/index.js @@ -1,5 +1,4 @@ -// eslint-disable-next-line no-unused-vars -import { fetch as fetchPolyfill } from 'whatwg-fetch'; +import 'whatwg-fetch'; import { DeveloperProfile } from './components/profile'; import './styles/global.css'; diff --git a/yarn.lock b/yarn.lock index 6ee6ddaba..a84cfe73b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -12032,6 +12032,11 @@ whatwg-fetch@>=0.10.0, whatwg-fetch@^3.0.0: resolved "https://registry.yarnpkg.com/whatwg-fetch/-/whatwg-fetch-3.0.0.tgz#fc804e458cc460009b1a2b966bc8817d2578aefb" integrity sha512-9GSJUgz1D4MfyKU7KRqwOjXCXTqWdFNvEr7eUBYchQiVc744mqK/MzXPNR2WsPkmkOa4ywfg8C2n8h+13Bey1Q== +whatwg-fetch@^2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/whatwg-fetch/-/whatwg-fetch-2.0.4.tgz#dde6a5df315f9d39991aa17621853d720b85566f" + integrity sha512-dcQ1GWpOD/eEQ97k66aiEVpNnapVj90/+R+SXTPYGHpYBBypfKJEQjLrvMZ7YXbKm21gXd4NcuxUTjiv1YtLng== + whatwg-mimetype@^2.1.0, whatwg-mimetype@^2.2.0, whatwg-mimetype@^2.3.0: version "2.3.0" resolved "https://registry.yarnpkg.com/whatwg-mimetype/-/whatwg-mimetype-2.3.0.tgz#3d4b1e0312d2079879f826aff18dbeeca5960fbf"