router.js
import Vue from 'vue';
import Router from 'vue-router';
export default new Router({
routes: [
{
path: '/Foo',
name: 'Foo',
//vue路由懒加载
component:() => import('../components/Foo')
}
]
})