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

Commit

Permalink
fix: exclude pages with children
Browse files Browse the repository at this point in the history
  • Loading branch information
danielroe committed Nov 7, 2022
1 parent 56e1b1c commit d83621b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/nuxt/src/pages/module.ts
Expand Up @@ -91,7 +91,7 @@ export default defineNuxtModule({
const processPages = (pages: NuxtPage[], currentPath = '/') => {
for (const page of pages) {
// Add root of optional dynamic paths and catchalls
if (page.path.match(/^\/?:.*(\?|\(\.\*\)\*)$/)) { prerenderRoutes.add(currentPath) }
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 d83621b

Please sign in to comment.