Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unfreeze the react-dom/server interface #11531

Merged
merged 4 commits into from
Nov 13, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion packages/react-dom/server.browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,10 @@

'use strict';

module.exports = require('./src/server/ReactDOMServerBrowser');
var ReactDOMServer = require('./src/server/ReactDOMServerBrowser');

// TODO: decide on the top-level export form.
// This is hacky but makes it work with both Rollup and Jest
module.exports = ReactDOMServer.default
? ReactDOMServer.default
: ReactDOMServer;
8 changes: 7 additions & 1 deletion packages/react-dom/server.node.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,10 @@

'use strict';

module.exports = require('./src/server/ReactDOMServerNode');
var ReactDOMServer = require('./src/server/ReactDOMServerNode');

// TODO: decide on the top-level export form.
// This is hacky but makes it work with both Rollup and Jest
module.exports = ReactDOMServer.default
? ReactDOMServer.default
: ReactDOMServer;
6 changes: 3 additions & 3 deletions packages/react-dom/src/server/ReactDOMServerBrowser.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ function renderToStaticNodeStream() {
);
}

export {
// Note: when changing this, also consider https://github.com/facebook/react/issues/11526
export default {
renderToString,
renderToStaticMarkup,
renderToNodeStream,
renderToStaticNodeStream,
version: ReactVersion,
};

export const version = ReactVersion;
6 changes: 3 additions & 3 deletions packages/react-dom/src/server/ReactDOMServerNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ import {
renderToStaticNodeStream,
} from './ReactDOMNodeStreamRenderer';

export {
// Note: when changing this, also consider https://github.com/facebook/react/issues/11526
export default {
renderToString,
renderToStaticMarkup,
renderToNodeStream,
renderToStaticNodeStream,
version: ReactVersion,
};

export const version = ReactVersion;