framework
framework copied to clipboard
How to use "extendRoutes" in nuxt3?
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