File tree Expand file tree Collapse file tree 1 file changed +0
-22
lines changed Expand file tree Collapse file tree 1 file changed +0
-22
lines changed Original file line number Diff line number Diff 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' )
You can’t perform that action at this time.
0 commit comments