diff --git a/website/src/entry/App.tsx b/website/src/entry/App.tsx index 167dff136d7..7d17ab940b7 100644 --- a/website/src/entry/App.tsx +++ b/website/src/entry/App.tsx @@ -1,3 +1,8 @@ +// core-js has issues with Promise feature detection on Edge, and hence +// polyfills Promise incorrectly. Importing this polyfill directly resolves that. +// This is necessary as PersistGate uses `Promise.prototype.finally`. +// See: https://github.com/zloirock/core-js/issues/579#issuecomment-504325213 +import 'core-js/es/promise/finally'; import { Store } from 'redux'; import { State } from 'types/state'; import { Persistor } from 'storage/persistReducer'; @@ -7,11 +12,6 @@ import { hot } from 'react-hot-loader/root'; import { BrowserRouter as Router } from 'react-router-dom'; import { Provider } from 'react-redux'; import { PersistGate } from 'redux-persist/integration/react'; -import 'core-js/es/promise/finally'; -// core-js has issues with Promise feature detection on Edge, and hence -// polyfills Promise incorrectly. Importing this polyfill directly resolves that -// This is necessary as PersistGate uses Promise.prototype.finally -// See: https://github.com/zloirock/core-js/issues/579#issuecomment-504325213 import AppShell from 'views/AppShell'; import Routes from 'views/routes/Routes';