Skip to content
This repository has been archived by the owner on Apr 6, 2023. It is now read-only.

Commit

Permalink
fix(nuxt): add catchall paths to prerender list (#8782)
Browse files Browse the repository at this point in the history
  • Loading branch information
danielroe committed Nov 9, 2022
1 parent e76ebdd commit 30d9947
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/nuxt/src/pages/module.ts
Expand Up @@ -90,6 +90,8 @@ export default defineNuxtModule({
prerenderRoutes.clear()
const processPages = (pages: NuxtPage[], currentPath = '/') => {
for (const page of pages) {
// Add root of optional dynamic paths and catchalls
if (page.path.match(/^\/?:.*(\?|\(\.\*\)\*)$/) && !page.children?.length) { prerenderRoutes.add(currentPath) }
// Skip dynamic paths
if (page.path.includes(':')) { continue }
const route = joinURL(currentPath, page.path)
Expand Down

0 comments on commit 30d9947

Please sign in to comment.