Skip to content

Commit 3b18f8f

Browse files
committed
fix: remove prerendering workaround
now present in nuxt itself: nuxt/framework#5709
1 parent a9ef0d7 commit 3b18f8f

1 file changed

Lines changed: 0 additions & 22 deletions

File tree

‎src/parts/router.ts‎

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -31,28 +31,6 @@ export const setupRouter = () => {
3131
)
3232
})
3333

34-
// Add all pages to be prerendered
35-
constroutes: string[]=[]
36-
37-
nuxt.hook('pages:extend',pages=>{
38-
routes.length=0
39-
routes.push('/', ...((nuxt.options.nitro.prerender?.routes||[])asstring[]))
40-
functionprocessPages(pages: NuxtPage[],currentPath=''){
41-
for(constpageofpages){
42-
if(page.path.includes(':'))continue
43-
44-
constpath=joinURL(currentPath,page.path)
45-
routes.push(path)
46-
if(page.children)processPages(page.children,path)
47-
}
48-
}
49-
processPages(pages)
50-
})
51-
52-
nuxt.hook('nitro:build:before',nitro=>{
53-
nitro.options.prerender.routes=routes
54-
})
55-
5634
// Remove vue-router types
5735
nuxt.hook('prepare:types',({ references })=>{
5836
constindex=references.findIndex(i=>'types'ini&&i.types==='vue-router')

0 commit comments

Comments
 (0)