import Vue from 'vue'
import VueRouter from 'vue-router'
import autoRoutes from './autoRoutes'

Vue.use(VueRouter)
autoRoutes.init()
export default new VueRouter({
  mode: 'history',
  hashbang: false,
  routes: autoRoutes.routes(),
  scrollBehavior(to) {
    if (to.hash) {
      return {
        selector: to.hash
      }
    }
  }
})
