Skip to content

Commit 570dc33

Browse files
committed
fix: add trailing slash to dynamic route rules
1 parent e33959f commit 570dc33

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

nuxt.config.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ export default defineNuxtConfig({
9292
router: {
9393
options: {
9494
scrollBehaviorType: 'smooth',
95+
strict: true,
9596
},
9697
},
9798

@@ -138,6 +139,10 @@ export default defineNuxtConfig({
138139
'/package/:name/v/:version': getISRConfig(3600),
139140
'/package/:org/:name': getISRConfig(60),
140141
'/package/:org/:name/v/:version': getISRConfig(3600),
142+
'/package/:name/': getISRConfig(60),
143+
'/package/:name/v/:version/': getISRConfig(3600),
144+
'/package/:org/:name/': getISRConfig(60),
145+
'/package/:org/:name/v/:version/': getISRConfig(3600),
141146
// infinite cache (versioned - doesn't change)
142147
'/package-code/**': { isr: true, cache: { maxAge: 365 * 24 * 60 * 60 } },
143148
'/package-docs/**': { isr: true, cache: { maxAge: 365 * 24 * 60 * 60 } },

0 commit comments

Comments
 (0)