| 1 | /** |
| 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. |
| 3 | * |
| 4 | * This source code is licensed under the MIT license found in the |
| 5 | * LICENSE file in the root directory of this source tree. |
| 6 | */ |
| 7 | |
| 8 | // This file is only used for tests. |
| 9 | // It lazily loads the implementation so that we get the correct set of host configs. |
| 10 | |
| 11 | import ReactVersion from 'shared/ReactVersion'; |
| 12 | export {ReactVersion as version}; |
| 13 | |
| 14 | export function renderToString() { |
| 15 | return require('./src/server/ReactDOMLegacyServerNode').renderToString.apply( |
| 16 | this, |
| 17 | arguments, |
| 18 | ); |
| 19 | } |
| 20 | export function renderToStaticMarkup() { |
| 21 | return require('./src/server/ReactDOMLegacyServerNode').renderToStaticMarkup.apply( |
| 22 | this, |
| 23 | arguments, |
| 24 | ); |
| 25 | } |
| 26 | |
| 27 | export function renderToPipeableStream() { |
| 28 | return require('./src/server/react-dom-server.node').renderToPipeableStream.apply( |
| 29 | this, |
| 30 | arguments, |
| 31 | ); |
| 32 | } |
| 33 | |
| 34 | export function resumeToPipeableStream() { |
| 35 | return require('./src/server/react-dom-server.node').resumeToPipeableStream.apply( |
| 36 | this, |
| 37 | arguments, |
| 38 | ); |
| 39 | } |
| 40 | |
| 41 | export function renderToReadableStream() { |
| 42 | return require('./src/server/react-dom-server.node').renderToReadableStream.apply( |
| 43 | this, |
| 44 | arguments, |
| 45 | ); |
| 46 | } |
| 47 | |
| 48 | export function resume() { |
| 49 | return require('./src/server/react-dom-server.node').resume.apply( |
| 50 | this, |
| 51 | arguments, |
| 52 | ); |
| 53 | } |