vue2.0构建一个SPA,router-view不切换

vue切换到2.0,vue-router也是2.0版本,代码如下,router-view没有变化,肯定哪里写错了,我现在看迷糊了,实在找不出来了,求助

/src/main.js

import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import { sync } from 'vuex-router-sync'
sync(store, router)
new Vue({
  router,
  store,
  ...App
}).$mount('#app')

/src/router/index.js

import Vue from 'vue'
import routes from './routes'
import VueRouter from 'vue-router'
Vue.use(VueRouter)
const router = new VueRouter({
  mode: 'history',
  routes
})
export default router

/src/router/routes.js

import loader from './loader'
const routes = [
  { path: '/index', name: 'index', component: (r) => require(['./../views/index.vue'], r) }
]
export default routes

/src/store/index.js

import Vue from 'vue'
import Vuex from 'vuex'
Vue.use(Vuex)
const store = new Vuex.Store({
  modules: {}
})
export default store

/src/view/index.vue

<template>
<div>
  <h1>{ msg }</h1>
</div>
</template>
<script>
import loader from './../../../router/loader'
export default {
  name: 'index',
  data () {
    return {
      msg: 'This is index'
    }
  },
  created () {
      console.log('This is index')
  }
}
</script>

/src/App.vue

<template>
  <div id="app">
    <router-link :to="'index'">index</router-link>
    <router-view></router-view>
  </div>
</template>

<script>
export default {
  name: 'app',
  mounted () {
    console.log('Hello App')
  }
}
</script>
sunday
修改的评论也不能少于六个字哦!
sunday
修改的评论也不能少于六个字哦!
Tomoe 回复 sunday
修改的评论也不能少于六个字哦!
sunday 回复 Tomoe
修改的评论也不能少于六个字哦!
sunday 回复 Tomoe
修改的评论也不能少于六个字哦!
JellyBool
修改的评论也不能少于六个字哦!
sunday 回复 JellyBool
修改的评论也不能少于六个字哦!
sunday 回复 JellyBool
修改的评论也不能少于六个字哦!
Tomoe
修改的评论也不能少于六个字哦!
sunday 回复 Tomoe
修改的评论也不能少于六个字哦!
Tomoe 回复 sunday
修改的评论也不能少于六个字哦!
sunday 回复 Tomoe
修改的评论也不能少于六个字哦!
Tomoe 回复 sunday
修改的评论也不能少于六个字哦!