mirror of
https://github.com/hanzoai/next.js.git
synced 2026-09-24 17:00:51 +00:00
This API has experimental modes for build validation but the dev validation is going to be stable in the next release.
20 lines
573 B
TypeScript
20 lines
573 B
TypeScript
// Same violation as `bare/page.tsx`, but with `instant = { level:
|
|
// 'error' }`. Per-segment override raises the level from the configured
|
|
// 'warning' to 'error', so build validation fires and fails the build in
|
|
// addition to the dev redbox.
|
|
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: per-segment `level: 'experimental-error'` escalates over
|
|
'warning'.
|
|
</p>
|
|
</main>
|
|
)
|
|
}
|