mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-22 05:35:13 +00:00
fix(nuxt): add catchall paths to prerender list (#8782)
This commit is contained in:
parent
e76ebdddd0
commit
30d99477ce
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user