File tree Expand file tree Collapse file tree 3 files changed +11
-1
lines changed
test/e2e/app-dir/app-static
app/force-dynamic-no-prerender/[id] Expand file tree Collapse file tree 3 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -1048,7 +1048,7 @@ export async function buildStaticPaths({
10481048export type AppConfig = {
10491049 revalidate ?: number | false
10501050 dynamicParams ?: true | false
1051- dynamic ?: 'auto' | 'error' | 'force-static'
1051+ dynamic ?: 'auto' | 'error' | 'force-static' | 'force-dynamic'
10521052 fetchCache ?: 'force-cache' | 'only-cache'
10531053 preferredRegion ?: string
10541054}
@@ -1354,6 +1354,10 @@ export async function isPageStatic({
13541354 { }
13551355 )
13561356
1357+ if ( appConfig . dynamic === 'force-dynamic' ) {
1358+ appConfig . revalidate = 0
1359+ }
1360+
13571361 if ( isDynamicRoute ( page ) ) {
13581362 ; ( {
13591363 paths : prerenderRoutes ,
Original file line number Diff line number Diff line change @@ -46,6 +46,7 @@ createNextDescribe(
4646 'dynamic-no-gen-params/[slug].html' ,
4747 'dynamic-no-gen-params/[slug].rsc' ,
4848 'dynamic-no-gen-params/[slug]/page.js' ,
49+ 'force-dynamic-no-prerender/[id]/page.js' ,
4950 'force-static/[slug]/page.js' ,
5051 'force-static/first.html' ,
5152 'force-static/first.rsc' ,
Original file line number Diff line number Diff line change 1+ export const dynamic = 'force-dynamic'
2+
3+ export default function Page ( { params } ) {
4+ throw new Error ( 'this should not attempt prerendering with force-dynamic' )
5+ }
You can’t perform that action at this time.
0 commit comments