mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-30 17:37:14 +00:00
23 lines
410 B
JavaScript
23 lines
410 B
JavaScript
import Vue from 'vue'
|
|
import Router from 'vue-router'
|
|
|
|
Vue.use(Router)
|
|
|
|
export function createRouter () {
|
|
return new Router({
|
|
mode: 'history',
|
|
routes: [
|
|
{
|
|
path: '/',
|
|
component: require('~/views/index.vue').default,
|
|
name: 'index'
|
|
},
|
|
{
|
|
path: '/about',
|
|
component: require('~/views/about.vue').default,
|
|
name: 'about'
|
|
}
|
|
]
|
|
})
|
|
}
|