mirror of
https://github.com/nuxt/nuxt.git
synced 2025-02-16 21:58:19 +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()
|
prerenderRoutes.clear()
|
||||||
const processPages = (pages: NuxtPage[], currentPath = '/') => {
|
const processPages = (pages: NuxtPage[], currentPath = '/') => {
|
||||||
for (const page of pages) {
|
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
|
// Skip dynamic paths
|
||||||
if (page.path.includes(':')) { continue }
|
if (page.path.includes(':')) { continue }
|
||||||
const route = joinURL(currentPath, page.path)
|
const route = joinURL(currentPath, page.path)
|
||||||
|
Loading…
Reference in New Issue
Block a user