mirror of
https://github.com/hanzoai/next.js.git
synced 2026-10-30 14:46:38 +00:00
This moves `experimental.cacheComponents` to a top level config. As part of this, I disabled some tests in `build-output-prerender` that assert on `cacheComponents` appearing in the experimental list. In a separate PR, I'm going to show that Cache Components is enabled next to the bundler info. This also updates some docs pages to remove "experimental" language.
15 lines
405 B
JavaScript
15 lines
405 B
JavaScript
import { cookies } from 'next/headers'
|
|
|
|
export const dynamic = 'error'
|
|
|
|
export default async function Page(props) {
|
|
const params = await props.params
|
|
// When PPR is enabled, we will bailout on parameter access.
|
|
if (!process.env.__NEXT_CACHE_COMPONENTS) {
|
|
if (params.id.includes('static-bailout')) {
|
|
console.log('calling cookies', await cookies())
|
|
}
|
|
}
|
|
return <p>Dynamic error</p>
|
|
}
|