【src/router/index.js】
import Vue from 'vue';
import VueRouter from 'vue-router';
import SectionA from '../views/SectionA';
import SectionB from '../views/SectionB';
import SectionC from '../views/SectionC';
const SectionA = (callback) => import('../views/SectionA').then( module => callback(module))
Vue.use(VueRouter)
const router = new Router({
routes: [
{ path: '/', redirect: SectionA },
{ path: '/sectionA', component: SectionA },
{ path: '/sectionB', component: SectionB },
{ path: '/sectionB', component: SectionC }
]
})
export default router;