[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:
Josh Story
2023-08-07 15:22:48 -07:00
committed by GitHub
parent 997f52fbb3
commit ea17cc18f4
@@ -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');
}