Files
Jiachi LiuandGitHub d5f596ed7b [metadata] only blocking render for html bots in ppr pages (#76379)
### What

In non-PRR mode, we keep the original behavior that metadata is blocking but stream the rest. Previously we also do the full dynamic rendering for both non-PPR and PPR pages, which is required for PPR pages to discard the postpone cache but not necessary for non-PPR pages.

This PR align the behavior as before.

Closes NDX-881
2025-02-23 17:09:18 +01:00

16 lines
383 B
TypeScript

import { connection } from 'next/server'
export default async function Page() {
await connection()
await new Promise((resolve) => setTimeout(resolve, 500))
return <p>suspenseful - dynamic</p>
}
export async function generateMetadata() {
await connection()
await new Promise((resolve) => setTimeout(resolve, 200))
return {
title: 'suspenseful page - dynamic',
}
}