diff --git a/front/package.json b/front/package.json index 98140a2..21fe3ff 100644 --- a/front/package.json +++ b/front/package.json @@ -30,12 +30,12 @@ "@types/react-select": "^3.0.4", "@typescript-eslint/eslint-plugin": "^1.12.0", "@typescript-eslint/parser": "^1.12.0", + "@ungap/global-this": "^0.3.1", "eslint": "^6.1.0", "eslint-config-airbnb-typescript": "^4.0.1", "eslint-plugin-import": "^2.14.0", "eslint-plugin-jsx-a11y": "^6.1.1", "eslint-plugin-react": "^7.14.2", - "globalthis": "^1.0.0", "http-status-codes": "^1.3.2", "link-lib": "^1.0.0-rc4", "link-redux": "^1.0.0-rc4.6", diff --git a/front/src/index.tsx b/front/src/index.tsx index 79daef1..3ebb863 100755 --- a/front/src/index.tsx +++ b/front/src/index.tsx @@ -7,7 +7,7 @@ import ReactDOM from "react-dom"; import "./index.css"; import App from "./App"; import * as serviceWorker from "./serviceWorker"; -(window as any).globalThis = require('globalthis/polyfill')() +import '@ungap/global-this' ReactDOM.render(, document.getElementById("root")); diff --git a/front/yarn.lock b/front/yarn.lock index 942ed6a..e765af5 100644 --- a/front/yarn.lock +++ b/front/yarn.lock @@ -1630,6 +1630,11 @@ lodash.unescape "4.0.1" semver "5.5.0" +"@ungap/global-this@^0.3.1": + version "0.3.1" + resolved "https://registry.yarnpkg.com/@ungap/global-this/-/global-this-0.3.1.tgz#e37e005301c64484a61eed90305210bf078a4bc5" + integrity sha512-6gxLxSsXmt3XcC2p0mRjeHOtZemfs/IswAyWJZU0b8UvCQAegRpjSrQK0Y+u3OQQ3V0ZYQkHVCV9V3dxnlJ5Zw== + "@webassemblyjs/ast@1.8.5": version "1.8.5" resolved "https://registry.yarnpkg.com/@webassemblyjs/ast/-/ast-1.8.5.tgz#51b1c5fe6576a34953bf4b253df9f0d490d9e359" @@ -4973,15 +4978,6 @@ globals@^11.1.0, globals@^11.7.0: resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e" integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA== -globalthis@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/globalthis/-/globalthis-1.0.0.tgz#c5fb98213a9b4595f59cf3e7074f141b4169daae" - integrity sha512-vcCAZTJ3r5Qcu5l8/2oyVdoFwxKgfYnMTR2vwWeux/NAVZK3PwcMaWkdUIn4GJbmKuRK7xcvDsLuK+CKcXyodg== - dependencies: - define-properties "^1.1.2" - function-bind "^1.1.1" - object-keys "^1.0.12" - globby@8.0.2: version "8.0.2" resolved "https://registry.yarnpkg.com/globby/-/globby-8.0.2.tgz#5697619ccd95c5275dbb2d6faa42087c1a941d8d"