Edit in JSFiddle

import Vue from 'vue'
import Router from 'vue-router'
import Hello from '@/components/Hello'
import Happy from '@/components/Happy'
Vue.use(Router)
export default new Router({
  routes: [
    {
      path: '/',
      name: 'Hello',
      component: Hello
    },
    {
      path: '/happy',
      name: 'Happy',
      component: Happy
    }
  ]
})