mirror of
https://github.com/hanzoai/next.js.git
synced 2026-09-24 17:00:51 +00:00
### What During the export phase in next build, we always enable the streaming metadata since if there's any dynamic access in metadata we can determine it in the build phase. If it's static, then it won't affect anything. If it's dynamic, then it can be handled when request hits the route. ### Why We want it enabled even during build b/c this is how we will enforce DIO rules without making any dynamic metadata automatically a build failure
28 lines
568 B
TypeScript
28 lines
568 B
TypeScript
import { Suspense } from 'react'
|
|
import { connection } from 'next/server'
|
|
|
|
export default function Page() {
|
|
return (
|
|
<div>
|
|
inner static page
|
|
<Suspense>
|
|
<Inner />
|
|
</Suspense>
|
|
</div>
|
|
)
|
|
}
|
|
|
|
async function Inner() {
|
|
await new Promise((resolve) => setTimeout(resolve, 500))
|
|
return <div>inner</div>
|
|
}
|
|
|
|
export async function generateMetadata() {
|
|
await new Promise((resolve) => setTimeout(resolve, 1 * 1000))
|
|
await connection()
|
|
return {
|
|
title: 'partial static page',
|
|
description: 'partial static page description',
|
|
}
|
|
}
|