import Vue from "vue"; import Router from "vue-router";// 引用路由 import Home from "./views/Home.vue";//导入方法1 Home页面 Vue.use(Router); export default new Router({ mode: "history", base: process.env.BASE_URL, routes: [ { path: "/", name: "home", component: Home }, { path: "/about",//路径 name: "about",//名字 component: () => import(/* webpackChunkName: "about" */ "./views/About.vue")//导入方法2,导入About页面 } ] });