Fix trailing build issues (#7450)

Use relative path for addons UMD shim module

Use explicit top level wrapper marker for top level elements
(cherry picked from commit 34c4474472)
This commit is contained in:
Sebastian Markbåge
2016-10-03 16:08:27 -07:00
committed by Paul O’Shannessy
parent 7ae3bbee25
commit 8426fafe90
3 changed files with 6 additions and 6 deletions
+4 -2
View File
@@ -19,7 +19,9 @@ var SECRET_INTERNALS_NAME = 'React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_
var shimSharedModules = globalShim.configure({
'./ReactCurrentOwner': SECRET_INTERNALS_NAME + '.ReactCurrentOwner',
'./ReactComponentTreeHook': SECRET_INTERNALS_NAME + '.ReactComponentTreeHook',
// All these methods are shared are exposed.
// The methods we used here are exposed on the main React export.
// TODO: Change all renderer code to require the isomorphic React directly
// instead of these internals.
'./ReactElement': 'React',
'./ReactPropTypes': 'React.PropTypes',
'./ReactChildren': 'React.Children',
@@ -27,7 +29,7 @@ var shimSharedModules = globalShim.configure({
var shimDOMModules = aliasify.configure({
'aliases': {
'./ReactAddonsDOMDependencies': './build/modules/ReactAddonsDOMDependenciesUMDShim.js',
'./ReactAddonsDOMDependencies': {relative: './ReactAddonsDOMDependenciesUMDShim'},
},
});
+1
View File
@@ -277,6 +277,7 @@ if (__DEV__) {
TopLevelWrapper.prototype.render = function() {
return this.props.child;
};
TopLevelWrapper.isReactTopLevelWrapper = true;
/**
* Mounting is the process of initializing a React component by creating its
@@ -160,10 +160,7 @@ function runBatchedUpdates(transaction) {
if (ReactFeatureFlags.logTopLevelRenders) {
var namedComponent = component;
// Duck type TopLevelWrapper. This is probably always true.
if (
component._currentElement.props.child ===
component._renderedComponent._currentElement
) {
if (component._currentElement.type.isReactTopLevelWrapper) {
namedComponent = component._renderedComponent;
}
markerName = 'React update: ' + namedComponent.getName();