mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
[Fizz][Float] emit viewport meta before preloads (#27201)
Fixes: #27200 preloads for images that appear before the viewport meta may be loaded twice because the proper device image information is not used with the preload but is with the image itself. The viewport meta should be emitted earlier than all preloads to avoid this. this change moves the queue for the viewport meta to preconnects which already has the right priority for this tag
This commit is contained in:
@@ -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');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user