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.
21 lines
632 B
TypeScript
21 lines
632 B
TypeScript
// Same violation as `bare/page.tsx`, but with `instant = { level:
|
|
// 'warning' }`. Per-segment override lowers the level from the configured
|
|
// 'experimental-error' to 'warning', so build validation does not fire and
|
|
// the build stays clean even though the violation exists. Dev still shows
|
|
// the instant redbox.
|
|
import { connection } from 'next/server'
|
|
|
|
export const instant = { level: 'warning' as const }
|
|
|
|
export default async function Page() {
|
|
await connection()
|
|
return (
|
|
<main>
|
|
<p>
|
|
explicit-warning: per-segment `level: 'warning'` lowers from
|
|
'experimental-error'.
|
|
</p>
|
|
</main>
|
|
)
|
|
}
|