I have Vite apps and routing using automatic routing with https://github.com/hannoeru/vite-plugin-pages. When I console.log() on the router/index.ts file, it shows the right routes. But when I tried to console.log() the routes on component with router.getRoutes() it shows some duplicated route with name: undefined.
router/index.ts
console.log("Routes", newRoutes)
const router = createRouter({
history: createWebHistory(BASE_URL),
routes: newRoutes,
})
layouts/default.vue
const router = useRouter();
console.log("Router naon", router.getRoutes());
I have tried looking on my Nuxtjs apps and it seems like it doesn't duplicated anything like this. This became problem because when I tried to push router with name, it doesn't go to the right page.