forked from facebook/react
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add package builds for new server renderer and enable tests (facebook…
…#9710) * Adjust some expectations of the server markup format of Fiber Currently this case is using the stack renderer. * Ensure debug hooks are injected into the Stack server renderer In our tests this normally happens because ReactDOM.js injects them into the shared module, but when Fiber is enabled or this is its own flat bundle, that doesn't happen. * Add package builds for new server renderer and enable tests ReactServer -> ReactDOMServerStream This file is going to be the replacement for ReactDOMServer. I mock ReactDOMServer and user ReactDOMServerStream when we have the fiber flag enabled. I'm now also enabling this as the default for distributions builds (react-dom/server on npm and react-dom-server.production.min.js as umd bundle). I'm using traverseStackChildren instead of traverseAllChildren because traverseAllChildren is now only in the isomorphic package and we don't want to build all of that that into the server package. I also have to require lower case react for the builds to work.
- Loading branch information
1 parent
8af7292
commit e5e874d
Showing
10 changed files
with
209 additions
and
83 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
/** | ||
* Copyright 2013-2015, 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. | ||
*/ | ||
|
||
'use strict'; | ||
|
||
var ReactDOMFeatureFlags = require('ReactDOMFeatureFlags'); | ||
|
||
var useFiber = ReactDOMFeatureFlags.useFiber; | ||
|
||
module.exports = useFiber | ||
? require('ReactDOMServerStream') | ||
: require.requireActual('ReactDOMServer'); |
Oops, something went wrong.