mirror of
https://github.com/facebook/react.git
synced 2026-11-18 20:15:56 +00:00
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:
1 parent
7ae3bbee25
commit
8426fafe90
3 files changed
+6
-6
No files matched your search
@@ -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'},
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in new issue
Block a user