import Vue from 'vue'
import VueRouter, {RouteConfig} from 'vue-router'

const config = require('../../public/config/sys-config.json');

Vue.use(VueRouter)

const routes: Array<RouteConfig> = [
  {
    path: '/',
    redirect: '/index'
  },
  {
    path: '/index',
    name: 'Home',
    component: () => import('@/views/layout/Layout.vue')
  }
]

const router = new VueRouter({
  base: config.projectName,
  routes
})

export default router
