Skip to content

Commit e33959f

Browse files
committed
fix: revert isr configs for dynamic pages
1 parent 8c3151c commit e33959f

1 file changed

Lines changed: 5 additions & 7 deletions

File tree

nuxt.config.ts

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -134,10 +134,10 @@ export default defineNuxtConfig({
134134
},
135135
},
136136
// pages
137-
'/package/:name': getISRConfig(60, { fallback: 'html' }),
138-
'/package/:name/v/:version': getISRConfig(60, { fallback: 'html' }),
139-
'/package/:org/:name': getISRConfig(60, { fallback: 'html' }),
140-
'/package/:org/:name/v/:version': getISRConfig(60, { fallback: 'html' }),
137+
'/package/:name': getISRConfig(60),
138+
'/package/:name/v/:version': getISRConfig(3600),
139+
'/package/:org/:name': getISRConfig(60),
140+
'/package/:org/:name/v/:version': getISRConfig(3600),
141141
// infinite cache (versioned - doesn't change)
142142
'/package-code/**': { isr: true, cache: { maxAge: 365 * 24 * 60 * 60 } },
143143
'/package-docs/**': { isr: true, cache: { maxAge: 365 * 24 * 60 * 60 } },
@@ -371,8 +371,6 @@ function getISRConfig(expirationSeconds: number, options: ISRConfigOptions = {})
371371
}
372372
}
373373
return {
374-
isr: {
375-
expiration: expirationSeconds,
376-
},
374+
isr: expirationSeconds,
377375
}
378376
}

0 commit comments

Comments
 (0)