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

File tree

1 file changed

+0
-22
lines changed

1 file changed

+0
-22
lines changed

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-
const routes: string[] = []
36-
37-
nuxt.hook('pages:extend', pages => {
38-
routes.length = 0
39-
routes.push('/', ...((nuxt.options.nitro.prerender?.routes || []) as string[]))
40-
function processPages(pages: NuxtPage[], currentPath = '') {
41-
for (const page of pages) {
42-
if (page.path.includes(':')) continue
43-
44-
const path = 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
const index = references.findIndex(i => 'types' in i && i.types === 'vue-router')

0 commit comments

Comments
 (0)