Skip to content

Commit 2f6763b

Browse files
committed
fix: check payload fallback with exact rule
1 parent 3e9476e commit 2f6763b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

nuxt.config.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,10 @@ export default defineNuxtConfig({
134134
},
135135
// pages
136136
'/package/**': getISRConfig(60, { fallback: 'html' }),
137-
'/package/**/_payload.json': getISRConfig(60, { fallback: 'json' }),
137+
'/package/:name/_payload.json': getISRConfig(60, { fallback: 'json' }),
138+
'/package/:name/v/:version/_payload.json': getISRConfig(60, { fallback: 'json' }),
139+
'/package/:org/:name/_payload.json': getISRConfig(60, { fallback: 'json' }),
140+
'/package/:org/:name/v/:version/_payload.json': getISRConfig(60, { fallback: 'json' }),
138141
// infinite cache (versioned - doesn't change)
139142
'/package-code/**': { isr: true, cache: { maxAge: 365 * 24 * 60 * 60 } },
140143
'/package-docs/**': { isr: true, cache: { maxAge: 365 * 24 * 60 * 60 } },

0 commit comments

Comments
 (0)