diff --git a/grunt/config/browserify.js b/grunt/config/browserify.js index 5cc3f1f840a76..cff70af4057ca 100644 --- a/grunt/config/browserify.js +++ b/grunt/config/browserify.js @@ -18,6 +18,7 @@ var shimSharedModules = aliasify.configure({ 'react/lib/React': 'react/lib/ReactUMDShim', 'react/lib/ReactCurrentOwner': 'react/lib/ReactCurrentOwnerUMDShim', 'react/lib/ReactComponentTreeHook': 'react/lib/ReactComponentTreeHookUMDShim', + 'react/lib/getNextDebugID': 'react/lib/getNextDebugIDUMDShim', }, }); diff --git a/gulpfile.js b/gulpfile.js index 8cacc6534361e..285342414e01a 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -139,6 +139,7 @@ var rendererSharedState = { 'react/lib/checkPropTypes': 'react/lib/checkPropTypes', 'react/lib/ReactComponentTreeHook': 'react/lib/ReactComponentTreeHook', 'react/lib/ReactDebugCurrentFrame': 'react/lib/ReactDebugCurrentFrame', + 'react/lib/getNextDebugID': 'react/lib/getNextDebugID', }; var moduleMapReactDOM = Object.assign( diff --git a/src/shared/utils/getNextDebugID.js b/src/isomorphic/getNextDebugID.js similarity index 100% rename from src/shared/utils/getNextDebugID.js rename to src/isomorphic/getNextDebugID.js diff --git a/src/umd/ReactUMDEntry.js b/src/umd/ReactUMDEntry.js index ab926354a63de..36c4fd75cf732 100644 --- a/src/umd/ReactUMDEntry.js +++ b/src/umd/ReactUMDEntry.js @@ -26,6 +26,7 @@ if (__DEV__) { { // ReactComponentTreeHook should not be included in production. ReactComponentTreeHook: require('react/lib/ReactComponentTreeHook'), + getNextDebugID: require('react/lib/getNextDebugID'), } ); } diff --git a/src/umd/ReactWithAddonsUMDEntry.js b/src/umd/ReactWithAddonsUMDEntry.js index c36ade28a98e5..e388e7ed73d50 100644 --- a/src/umd/ReactWithAddonsUMDEntry.js +++ b/src/umd/ReactWithAddonsUMDEntry.js @@ -27,6 +27,7 @@ if (__DEV__) { { // ReactComponentTreeHook should not be included in production. ReactComponentTreeHook: require('react/lib/ReactComponentTreeHook'), + getNextDebugID: require('getNextDebugID'), } ); } diff --git a/src/umd/shims/getNextDebugIDUMDShim.js b/src/umd/shims/getNextDebugIDUMDShim.js new file mode 100644 index 0000000000000..3c8855d20501d --- /dev/null +++ b/src/umd/shims/getNextDebugIDUMDShim.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 getNextDebugId + */ + +/* globals React */ + +'use strict'; + +var ReactInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; + +module.exports = ReactInternals.getNextDebugID; +