diff --git a/packages/react-error-overlay/package.json b/packages/react-error-overlay/package.json index a00c0d232591b6e2eafa9ba4157d5974763de3ba..bdba0aa2069efcb6b84ebc186f1156c29c1d7dd2 100644 --- a/packages/react-error-overlay/package.json +++ b/packages/react-error-overlay/package.json @@ -55,6 +55,7 @@ "promise": "8.0.2", "raw-loader": "^0.5.1", "react": "^16.3.2", + "react-app-polyfill": "^0.0.0", "react-dom": "^16.3.2", "rimraf": "^2.6.2", "settle-promise": "1.0.0", diff --git a/packages/react-error-overlay/src/iframeScript.js b/packages/react-error-overlay/src/iframeScript.js index 3da820264b4b43c922601db07fbc08f6a6e95ed7..011172b5d5656000c1ec91dbc727624bfe4926b6 100644 --- a/packages/react-error-overlay/src/iframeScript.js +++ b/packages/react-error-overlay/src/iframeScript.js @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import './utils/pollyfills.js'; +import 'react-app-polyfill/ie9'; import React from 'react'; import ReactDOM from 'react-dom'; import CompileErrorContainer from './containers/CompileErrorContainer'; diff --git a/packages/react-error-overlay/src/utils/pollyfills.js b/packages/react-error-overlay/src/utils/pollyfills.js deleted file mode 100644 index ddd5aeb9651544568390c7e740c4a564053dd9a3..0000000000000000000000000000000000000000 --- a/packages/react-error-overlay/src/utils/pollyfills.js +++ /dev/null @@ -1,18 +0,0 @@ -/** - * Copyright (c) 2015-present, Facebook, Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - -if (typeof Promise === 'undefined') { - // Rejection tracking prevents a common issue where React gets into an - // inconsistent state due to an error, but it gets swallowed by a Promise, - // and the user has no idea what causes React's erratic future behavior. - require('promise/lib/rejection-tracking').enable(); - window.Promise = require('promise/lib/es6-extensions.js'); -} - -// Object.assign() is commonly used with React. -// It will use the native implementation if it's present and isn't buggy. -Object.assign = require('object-assign'); diff --git a/packages/react-error-overlay/webpack.config.iframe.js b/packages/react-error-overlay/webpack.config.iframe.js index 7e8784eb01bb7bff08a4a3368b464f77aeed0576..ac5b6dcd41fdb32f5cf6c6f22cda3b4527075235 100644 --- a/packages/react-error-overlay/webpack.config.iframe.js +++ b/packages/react-error-overlay/webpack.config.iframe.js @@ -76,4 +76,5 @@ module.exports = { __REACT_DEVTOOLS_GLOBAL_HOOK__: '({})', }), ], + performance: false, };