File tree Expand file tree Collapse file tree 3 files changed +17
-0
lines changed
test/e2e/app-dir/app-static/app
partial-gen-params-no-additional-lang/[lang]/[slug]
partial-gen-params-no-additional-slug/[lang]/[slug] Expand file tree Collapse file tree 3 files changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -1438,6 +1438,21 @@ export async function buildAppStaticPaths({
1438
1438
const newParams : Params [ ] = [ ]
1439
1439
1440
1440
if ( curGenerate . generateStaticParams ) {
1441
+ const curStore =
1442
+ ComponentMod . staticGenerationAsyncStorage . getStore ( )
1443
+
1444
+ if ( curStore ) {
1445
+ if ( typeof curGenerate ?. config ?. fetchCache !== 'undefined' ) {
1446
+ curStore . fetchCache = curGenerate . config . fetchCache
1447
+ }
1448
+ if ( typeof curGenerate ?. config ?. revalidate !== 'undefined' ) {
1449
+ curStore . revalidate = curGenerate . config . revalidate
1450
+ }
1451
+ if ( curGenerate ?. config ?. dynamic === 'force-dynamic' ) {
1452
+ curStore . forceDynamic = true
1453
+ }
1454
+ }
1455
+
1441
1456
for ( const params of paramsItems ) {
1442
1457
const result = await curGenerate . generateStaticParams ( {
1443
1458
params,
Original file line number Diff line number Diff line change 1
1
export const dynamicParams = true
2
+ export const fetchCache = 'default-cache'
2
3
3
4
export async function generateStaticParams ( ) {
4
5
const res = await fetch (
Original file line number Diff line number Diff line change 1
1
export const dynamicParams = false
2
+ export const fetchCache = 'default-cache'
2
3
3
4
export async function generateStaticParams ( ) {
4
5
const res = await fetch (
You can’t perform that action at this time.
0 commit comments