Skip to content

Commit

Permalink
the viewport meta tag needs to be emitted before any preloads to have…
Browse files Browse the repository at this point in the history
… the proper resolution loaded in some cases. This change updates our queueing strategy to utilize our preconnect queue for the viewport meta tag
  • Loading branch information
gnoff committed Aug 7, 2023
1 parent 997f52f commit bc15396
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/react-dom-bindings/src/server/ReactFizzConfigDOM.js
Original file line number Diff line number Diff line change
Expand Up @@ -1920,6 +1920,9 @@ function pushMeta(

if (typeof props.charSet === 'string') {
return pushSelfClosing(responseState.charsetChunks, props, 'meta');
} else if (props.name === 'viewport') {
// "viewport" isn't related to preconnect but it has the right priority
return pushSelfClosing(responseState.preconnectChunks, props, 'meta');
} else {
return pushSelfClosing(responseState.hoistableChunks, props, 'meta');
}
Expand Down

0 comments on commit bc15396

Please sign in to comment.