diff --git a/packages/react-dom-bindings/src/server/ReactFizzConfigDOM.js b/packages/react-dom-bindings/src/server/ReactFizzConfigDOM.js index f4fae4d307efb..646e61608a7b9 100644 --- a/packages/react-dom-bindings/src/server/ReactFizzConfigDOM.js +++ b/packages/react-dom-bindings/src/server/ReactFizzConfigDOM.js @@ -130,11 +130,8 @@ export type ResponseState = { startInlineScript: PrecomputedChunk, instructions: InstructionState, - // state for outputting CSP nonce - nonce: string | void, - // state for data streaming format - externalRuntimeConfig: BootstrapScriptDescriptor | null, + externalRuntimeScript: null | ExternalRuntimeScript, // preamble and postamble chunks and state htmlChunks: null | Array, @@ -196,6 +193,10 @@ export type BootstrapScriptDescriptor = { src: string, integrity?: string, }; +export type ExternalRuntimeScript = { + src: string, + chunks: Array, +}; // Allows us to keep track of what we've already written so we can refer back to it. // if passed externalRuntimeConfig and the enableFizzExternalRuntime feature flag // is set, the server will send instructions via data attributes (instead of inline scripts) @@ -215,7 +216,7 @@ export function createResponseState( '']); + ).toEqual(['']); expect(getVisibleChildren(document)).toEqual(