mirror of
https://github.com/hanzoai/next.js.git
synced 2026-10-30 14:46:38 +00:00
This API has experimental modes for build validation but the dev validation is going to be stable in the next release.
21 lines
679 B
TypeScript
21 lines
679 B
TypeScript
// Same shape as bare/page.tsx — runtime data accessed outside a Suspense
|
|
// boundary — but with an explicit `instant = { level: 'experimental-error' }`.
|
|
// Even though the validation level is 'manual-warning', the explicit
|
|
// per-segment opt-in escalates validation to error level in both dev and
|
|
// build, and the violation should fail the build.
|
|
import { connection } from 'next/server'
|
|
|
|
export const instant = { level: 'experimental-error' as const }
|
|
|
|
export default async function Page() {
|
|
await connection()
|
|
return (
|
|
<main>
|
|
<p>
|
|
explicit-error page (instant level: experimental-error), runtime data at
|
|
the top.
|
|
</p>
|
|
</main>
|
|
)
|
|
}
|