import { createRouter, createWebHistory } from 'vue-router' import type { RouteRecordRaw } from 'vue-router' // 路由配置 const routes: RouteRecordRaw[] = [ { path: '/', name: 'Home', component: () => import('../views/Home.vue') }, ] // 创建路由实例 const router = createRouter({ history: createWebHistory(import.meta.env.BASE_URL), routes }) export default router