Currently working on my Vue project, using TypeScript with Vite. To handle routing, I am utilizing the 'vite-plugin-pages' plugin.
Encountered a type error while importing routes from the '~pages' directory.
Here's a snippet of my router code:
import { createRouter, createWebHistory } from "vue-router";
import routes from "~pages"; // issue occurs here
const router = createRouter({
history: createWebHistory(import.meta.env.BASE_URL),
routes,
});
export default router;
The error message displayed is linked below: