import { createRouter, createWebHashHistory, RouteRecordRaw } from 'vue-router' const routes: Array<RouteRecordRaw> = [ { path: '/', name: 'Home', component: () => import(/* webpackChunkName: "home" */ '../views/Home.vue') } ] const router = createRouter({ // 改变路由模式 // history: createWebHistory(process.env.BASE_URL), history: createWebHashHistory(process.env.BASE_URL), routes }) export default router