forked from vercel/next.js
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Do not inline CSS in RSC payload for dynamic client nav (vercel#73182)
- Loading branch information
Showing
6 changed files
with
80 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import './styles.css' | ||
|
||
export default function Page() { | ||
return ( | ||
<div className="page" id="page-a"> | ||
Page A | ||
</div> | ||
) | ||
} | ||
|
||
export const dynamic = 'force-dynamic' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.page { | ||
font-size: 100px; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import '../global.css' // duplicate global.css to test it's consolidated by React Float | ||
|
||
export const dynamic = 'force-dynamic' | ||
|
||
export default function Page() { | ||
return ( | ||
<div className="page" id="page-b"> | ||
Page B | ||
</div> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,25 @@ | ||
import Link from 'next/link' | ||
import './global.css' | ||
|
||
export default function RootLayout({ children }) { | ||
return ( | ||
<html> | ||
<body>{children}</body> | ||
<body> | ||
<nav> | ||
<Link href="/" prefetch={false}> | ||
Home | ||
</Link> | ||
{' | '} | ||
<Link href="/a" id="link-a" prefetch={false}> | ||
Page A | ||
</Link> | ||
{' | '} | ||
<Link href="/b" id="link-b" prefetch={false}> | ||
Page B | ||
</Link> | ||
</nav> | ||
{children} | ||
</body> | ||
</html> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters