import { createMemoryHistory, createRouter } from 'vue-router'; const routes = [ { path: '/', redirect: '/index' }, { path: '/index', component: () => import('@/views/home/index.vue') }, { path: '/menu', component: () => import('@/views/menu/index.vue') }, ]; const router = createRouter({ history: createMemoryHistory(), routes, }); export default router;