diff --git a/packages/react-dom-bindings/src/server/ReactFizzConfigDOM.js b/packages/react-dom-bindings/src/server/ReactFizzConfigDOM.js index 353a534090b69..5314564242ed9 100644 --- a/packages/react-dom-bindings/src/server/ReactFizzConfigDOM.js +++ b/packages/react-dom-bindings/src/server/ReactFizzConfigDOM.js @@ -5510,6 +5510,7 @@ function preloadAsStylePropsFromProps(href: string, props: any): PreloadProps { as: 'style', href: href, crossOrigin: props.crossOrigin, + fetchPriority: props.fetchPriority, integrity: props.integrity, media: props.media, hrefLang: props.hrefLang, @@ -5523,7 +5524,9 @@ function preloadAsScriptPropsFromProps(href: string, props: any): PreloadProps { as: 'script', href, crossOrigin: props.crossOrigin, + fetchPriority: props.fetchPriority, integrity: props.integrity, + nonce: props.nonce, referrerPolicy: props.referrerPolicy, }; } diff --git a/packages/react-dom/src/__tests__/ReactDOMFloat-test.js b/packages/react-dom/src/__tests__/ReactDOMFloat-test.js index 272d7996bb7ff..842b9c4153e2c 100644 --- a/packages/react-dom/src/__tests__/ReactDOMFloat-test.js +++ b/packages/react-dom/src/__tests__/ReactDOMFloat-test.js @@ -4531,6 +4531,43 @@ body { ); }); + // @gate enableFloat + it('respects attributes defined on the stylesheet element when preloading stylesheets during server rendering', async () => { + await act(() => { + const {pipe} = renderToPipeableStream( + +
+ + + + +