From c84f4e03bc2350c4a6b22174a1a3ec98974ca25d Mon Sep 17 00:00:00 2001 From: Dan Abramov Date: Thu, 23 Mar 2017 21:15:30 +0000 Subject: [PATCH] Add missing ReactErrorUtils shim --- .../shims/facebook-www/ReactErrorUtils.js | 19 +++++++++++++++++++ src/fb/ReactDOMFBEntry.js | 1 + src/fb/ReactDOMFiberFBEntry.js | 1 + 3 files changed, 21 insertions(+) create mode 100644 scripts/rollup/shims/facebook-www/ReactErrorUtils.js diff --git a/scripts/rollup/shims/facebook-www/ReactErrorUtils.js b/scripts/rollup/shims/facebook-www/ReactErrorUtils.js new file mode 100644 index 0000000000..1727cdba7b --- /dev/null +++ b/scripts/rollup/shims/facebook-www/ReactErrorUtils.js @@ -0,0 +1,19 @@ +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ReactErrorUtils + * @flow + */ + +'use strict'; + +const { + __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED, +} = require('ReactDOM-fb'); + +module.exports = __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactErrorUtils; diff --git a/src/fb/ReactDOMFBEntry.js b/src/fb/ReactDOMFBEntry.js index 82758127e7..d288640e8f 100644 --- a/src/fb/ReactDOMFBEntry.js +++ b/src/fb/ReactDOMFBEntry.js @@ -34,6 +34,7 @@ ReactDOM.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = { // These are real internal dependencies that are trickier to remove: EventPluginHub: require('EventPluginHub'), ReactBrowserEventEmitter: require('ReactBrowserEventEmitter'), + ReactErrorUtils: require('ReactErrorUtils'), ReactDOMComponentTree: require('ReactDOMComponentTree'), ReactInstanceMap: require('react-dom/lib/ReactInstanceMap'), // This is used for ajaxify on www: diff --git a/src/fb/ReactDOMFiberFBEntry.js b/src/fb/ReactDOMFiberFBEntry.js index 427c3d0c11..ed3c428a14 100644 --- a/src/fb/ReactDOMFiberFBEntry.js +++ b/src/fb/ReactDOMFiberFBEntry.js @@ -33,6 +33,7 @@ ReactDOMFiber.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = { // These are real internal dependencies that are trickier to remove: EventPluginHub: require('EventPluginHub'), ReactBrowserEventEmitter: require('ReactBrowserEventEmitter'), + ReactErrorUtils: require('ReactErrorUtils'), ReactFiberErrorLogger: require('ReactFiberErrorLogger'), ReactDOMComponentTree: require('ReactDOMComponentTree'), ReactInstanceMap: require('react-dom/lib/ReactInstanceMap'),