Skip to content

Commit 11b42c5

Browse files
committed
fix: restore isr configs for dynamic pages
1 parent dbcffe1 commit 11b42c5

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

nuxt.config.ts

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -134,10 +134,14 @@ export default defineNuxtConfig({
134134
},
135135
},
136136
// pages
137-
'/package/:name': getISRConfig(60),
138-
'/package/:name/v/:version': getISRConfig(60),
139-
'/package/:org/:name': getISRConfig(60),
140-
'/package/:org/:name/v/:version': getISRConfig(60),
137+
'/package/:name': getISRConfig(60, { fallback: 'html' }),
138+
'/package/:name/_payload.json': getISRConfig(60, { fallback: 'json' }),
139+
'/package/:name/v/:version': getISRConfig(60, { fallback: 'html' }),
140+
'/package/:name/v/:version/_payload.json': getISRConfig(60, { fallback: 'json' }),
141+
'/package/:org/:name': getISRConfig(60, { fallback: 'html' }),
142+
'/package/:org/:name/_payload.json': getISRConfig(60, { fallback: 'json' }),
143+
'/package/:org/:name/v/:version': getISRConfig(60, { fallback: 'html' }),
144+
'/package/:org/:name/v/:version/_payload.json': getISRConfig(60, { fallback: 'json' }),
141145
// infinite cache (versioned - doesn't change)
142146
'/package-code/**': { isr: true, cache: { maxAge: 365 * 24 * 60 * 60 } },
143147
'/package-docs/**': { isr: true, cache: { maxAge: 365 * 24 * 60 * 60 } },

0 commit comments

Comments
 (0)