framework icon indicating copy to clipboard operation
framework copied to clipboard

How to use "extendRoutes" in nuxt3?

Open alterhu2020 opened this issue 3 years ago • 2 comments

Discussed in https://github.com/nuxt/framework/discussions/1523

Originally posted by crotanite October 27, 2021 nuxt 2 documentation for modules says there is an extendRoutes function, but this doesn't seem to be importable at all through nuxt3

Is it currently possible to use this in nuxt3?

also tried this way: in nuxt.config.ts file

 hooks: {
        'pages:extend': (pages: NuxtPage[]) => {
            pages.push({
                redirect: (to) => {
                    
                }
            })
        }
    }

but the redirect property is only string type supported

alterhu2020 avatar Nov 14 '22 05:11 alterhu2020