Skip to content

Commit 8d26e62

Browse files
committed
prefetch-dns -> dns-prefetch
1 parent 9f7339a commit 8d26e62

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -849,7 +849,7 @@ export function resourcesFromLink(props: Props): boolean {
849849
resources.headsMap.set(key, resource);
850850
switch (rel) {
851851
case 'preconnect':
852-
case 'prefetch-dns': {
852+
case 'dns-prefetch': {
853853
resources.preconnects.add(resource);
854854
break;
855855
}

packages/react-dom/src/__tests__/ReactDOMFloat-test.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -955,7 +955,7 @@ describe('ReactDOMFloat', () => {
955955
<link rel="preload" href="bar" as="style" />
956956
<link rel="stylesheet" href="bar" precedence="default" />
957957
<link rel="preconnect" href="bar" />
958-
<link rel="prefetch-dns" href="bar" />
958+
<link rel="dns-prefetch" href="bar" />
959959
<link rel="icon" href="bar" />
960960
<link rel="icon" href="bar" sizes="1x1" />
961961
<link rel="icon" href="bar" media="foo" />
@@ -965,15 +965,15 @@ describe('ReactDOMFloat', () => {
965965
);
966966
pipe(writable);
967967
});
968-
// "preconnect" and "prefetch-dns" get hoisted to the front.
968+
// "preconnect" and "dns-prefetch" get hoisted to the front.
969969
// All other generic links (not styles, or typed preloads)
970970
// get emitted after styles and other higher priority Resources
971971
// Sizes and Media are part of generic link keys
972972
expect(getMeaningfulChildren(document)).toEqual(
973973
<html>
974974
<head>
975975
<link rel="preconnect" href="bar" />
976-
<link rel="prefetch-dns" href="bar" />
976+
<link rel="dns-prefetch" href="bar" />
977977
<link rel="stylesheet" href="bar" data-precedence="default" />
978978
<link rel="foo" href="bar" />
979979
<link rel="preload" href="bar" />
@@ -1001,7 +1001,7 @@ describe('ReactDOMFloat', () => {
10011001
<link rel="preload" href="bar" as="style" />
10021002
<link rel="stylesheet" href="bar" precedence="default" />
10031003
<link rel="preconnect" href="bar" />
1004-
<link rel="prefetch-dns" href="bar" />
1004+
<link rel="dns-prefetch" href="bar" />
10051005
<link rel="icon" href="bar" />
10061006
<link rel="icon" href="bar" sizes="1x1" />
10071007
<link rel="icon" href="bar" media="foo" />
@@ -1014,7 +1014,7 @@ describe('ReactDOMFloat', () => {
10141014
<html>
10151015
<head>
10161016
<link rel="preconnect" href="bar" />
1017-
<link rel="prefetch-dns" href="bar" />
1017+
<link rel="dns-prefetch" href="bar" />
10181018
<link rel="stylesheet" href="bar" data-precedence="default" />
10191019
<link rel="foo" href="bar" />
10201020
<link rel="preload" href="bar" />

0 commit comments

Comments
 (0)