Skip to content

Commit bc15396

Browse files
committed
the viewport meta tag needs to be emitted before any preloads to have the proper resolution loaded in some cases. This change updates our queueing strategy to utilize our preconnect queue for the viewport meta tag
1 parent 997f52f commit bc15396

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

packages/react-dom-bindings/src/server/ReactFizzConfigDOM.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1920,6 +1920,9 @@ function pushMeta(
19201920

19211921
if (typeof props.charSet === 'string') {
19221922
return pushSelfClosing(responseState.charsetChunks, props, 'meta');
1923+
} else if (props.name === 'viewport') {
1924+
// "viewport" isn't related to preconnect but it has the right priority
1925+
return pushSelfClosing(responseState.preconnectChunks, props, 'meta');
19231926
} else {
19241927
return pushSelfClosing(responseState.hoistableChunks, props, 'meta');
19251928
}

0 commit comments

Comments
 (0)