Skip to content

Commit 1c340d1

Browse files
authored
Merge pull request #91 from klarkc/master
Add polyfills to support old browsers
2 parents 997a63d + 9dfeb85 commit 1c340d1

File tree

4 files changed

+29
-3
lines changed

4 files changed

+29
-3
lines changed

app/client/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
"node-forge": "^0.9.1",
1919
"pixelmatch": "^5.2.1",
2020
"react": "^16.13.1",
21+
"react-app-polyfill": "^2.0.0",
2122
"react-dom": "^16.13.1",
2223
"react-flexbox-grid": "^2.1.2",
2324
"react-i18next": "^11.7.4",

app/client/src/index.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import './polyfills';
12
import React, { Suspense } from 'react';
23
import './config/i18n';
34
import ReactDOM from 'react-dom';

app/client/src/polyfills.tsx

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
// recommended by create-react-app
2+
import 'react-app-polyfill/ie9';
3+
import 'react-app-polyfill/ie11';
4+
import 'react-app-polyfill/stable';
5+
// probably is better to load polyfills on demand,
6+
// browser tests are required to detect which polyfills are needed
7+
import 'core-js';

app/client/yarn.lock

+20-3
Original file line numberDiff line numberDiff line change
@@ -3483,6 +3483,11 @@ core-js@^3.5.0:
34833483
resolved "https://registry.npmjs.org/core-js/-/core-js-3.8.1.tgz#f51523668ac8a294d1285c3b9db44025fda66d47"
34843484
integrity sha512-9Id2xHY1W7m8hCl8NkhQn5CufmF/WuR30BTRewvCXc1aZd3kMECwNZ69ndLbekKfakw9Rf2Xyc+QR6E7Gg+obg==
34853485

3486+
core-js@^3.6.5:
3487+
version "3.8.3"
3488+
resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.8.3.tgz#c21906e1f14f3689f93abcc6e26883550dd92dd0"
3489+
integrity sha512-KPYXeVZYemC2TkNEkX/01I+7yd+nX3KddKwZ1Ww7SKWdI2wQprSgLmrTddT8nw92AjEklTsPBoSdQBhbI1bQ6Q==
3490+
34863491
[email protected], core-util-is@~1.0.0:
34873492
version "1.0.2"
34883493
resolved "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7"
@@ -8911,7 +8916,7 @@ promise-inflight@^1.0.1:
89118916
resolved "https://registry.npmjs.org/promise-inflight/-/promise-inflight-1.0.1.tgz#98472870bf228132fcbdd868129bad12c3c029e3"
89128917
integrity sha1-mEcocL8igTL8vdhoEputEsPAKeM=
89138918

8914-
promise@^8.0.3:
8919+
promise@^8.0.3, promise@^8.1.0:
89158920
version "8.1.0"
89168921
resolved "https://registry.npmjs.org/promise/-/promise-8.1.0.tgz#697c25c3dfe7435dd79fcd58c38a135888eaf05e"
89178922
integrity sha512-W04AqnILOL/sPRXziNicCjSNRruLAuIHEOVBazepu0545DDNGYHz7ar9ZgZ1fMU8/MA4mVxp5rkBWRi6OXIy3Q==
@@ -9092,6 +9097,18 @@ react-app-polyfill@^1.0.6:
90929097
regenerator-runtime "^0.13.3"
90939098
whatwg-fetch "^3.0.0"
90949099

9100+
react-app-polyfill@^2.0.0:
9101+
version "2.0.0"
9102+
resolved "https://registry.yarnpkg.com/react-app-polyfill/-/react-app-polyfill-2.0.0.tgz#a0bea50f078b8a082970a9d853dc34b6dcc6a3cf"
9103+
integrity sha512-0sF4ny9v/B7s6aoehwze9vJNWcmCemAUYBVasscVr92+UYiEqDXOxfKjXN685mDaMRNF3WdhHQs76oTODMocFA==
9104+
dependencies:
9105+
core-js "^3.6.5"
9106+
object-assign "^4.1.1"
9107+
promise "^8.1.0"
9108+
raf "^3.4.1"
9109+
regenerator-runtime "^0.13.7"
9110+
whatwg-fetch "^3.4.1"
9111+
90959112
react-dev-utils@^10.2.1:
90969113
version "10.2.1"
90979114
resolved "https://registry.npmjs.org/react-dev-utils/-/react-dev-utils-10.2.1.tgz#f6de325ae25fa4d546d09df4bb1befdc6dd19c19"
@@ -9419,7 +9436,7 @@ regenerator-runtime@^0.11.0:
94199436
resolved "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz#be05ad7f9bf7d22e056f9726cee5017fbf19e2e9"
94209437
integrity sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==
94219438

9422-
regenerator-runtime@^0.13.3, regenerator-runtime@^0.13.4:
9439+
regenerator-runtime@^0.13.3, regenerator-runtime@^0.13.4, regenerator-runtime@^0.13.7:
94239440
version "0.13.7"
94249441
resolved "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.7.tgz#cac2dacc8a1ea675feaabaeb8ae833898ae46f55"
94259442
integrity sha512-a54FxoJDIr27pgf7IgeQGxmqUNYrcV338lf/6gH456HZ/PhX+5BcwHXG9ajESmwe6WRO0tAzRUrRmNONWgkrew==
@@ -11259,7 +11276,7 @@ whatwg-encoding@^1.0.1, whatwg-encoding@^1.0.3, whatwg-encoding@^1.0.5:
1125911276
dependencies:
1126011277
iconv-lite "0.4.24"
1126111278

11262-
whatwg-fetch@^3.0.0:
11279+
whatwg-fetch@^3.0.0, whatwg-fetch@^3.4.1:
1126311280
version "3.5.0"
1126411281
resolved "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-3.5.0.tgz#605a2cd0a7146e5db141e29d1c62ab84c0c4c868"
1126511282
integrity sha512-jXkLtsR42xhXg7akoDKvKWE40eJeI+2KZqcp2h3NsOrRnDvtWX36KcKl30dy+hxECivdk2BVUHVNrPtoMBUx6A==

0 commit comments

Comments
 (0)