* The tree created in next-app-loader that holds component segments and modules
*/
constloaderTree:LoaderTree=ComponentMod.tree
consttryGetPreviewData=
process.env.NEXT_RUNTIME==='edge'
?()=>false
:require('./api-utils/node').tryGetPreviewData
// Reads of this are cached on the `req` object, so this should resolve
// instantly. There's no need to pass this data down from a previous
// invoke, where we'd have to consider server & serverless.
constpreviewData=tryGetPreviewData(
req,
res,
(renderOptsasany).previewProps
)
/**
* Server Context is specifically only available in Server Components.
* It has to hold values that can't change while rendering from the common layout down.
...
...
@@ -645,9 +714,6 @@ export async function renderToHTMLOrFlight(
constserverContexts:Array<[string,any]>=[
['WORKAROUND',null],// TODO-APP: First value has a bug currently where the value is not set on the second request: https://github.com/facebook/react/issues/24849