Skip to content

Incomplete Warning for extendRoutes. #407

Closed Answered by posva
TomT15 asked this question in Q&A
Discussion options

You must be logged in to vote

I'm glad you found a way! So you can avoid the deprecation warning with:

const targetRoute = routes.find((r) => r.path === '/')
if (targetRoute) {
  targetRoute.redirect = { name: '/dashboards/admin' }
}
const router = createRouter({
  routes,
  history: createWebHistory(import.meta.env.VITE_BASE_ROUTE)
});

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@TomT15
Comment options

@TomT15
Comment options

@posva
Comment options

Answer selected by TomT15
@TomT15
Comment options

@mfwonghk
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants