47 lines
1.2 KiB
JavaScript
47 lines
1.2 KiB
JavaScript
|
import Vue from "vue"
|
||
|
import VueRouter from "vue-router"
|
||
|
|
||
|
Vue.use(VueRouter)
|
||
|
|
||
|
const routes = [
|
||
|
{
|
||
|
path: "/",
|
||
|
name: "Home",
|
||
|
component: () => import(/* webpackChunkName: "home" */ "../views/Home.vue")
|
||
|
},
|
||
|
{
|
||
|
path: "/projects",
|
||
|
name: "Projects",
|
||
|
// route level code-splitting
|
||
|
// this generates a separate chunk (about.[hash].js) for this route
|
||
|
// which is lazy-loaded when the route is visited.
|
||
|
component: () =>
|
||
|
import(/* webpackChunkName: "projects" */ "../views/Projects.vue")
|
||
|
},
|
||
|
{
|
||
|
path: "/contact",
|
||
|
name: "Contact",
|
||
|
// route level code-splitting
|
||
|
// this generates a separate chunk (about.[hash].js) for this route
|
||
|
// which is lazy-loaded when the route is visited.
|
||
|
component: () =>
|
||
|
import(/* webpackChunkName: "contact" */ "../views/Contact.vue")
|
||
|
},
|
||
|
{
|
||
|
path: "*",
|
||
|
name: "Not Found",
|
||
|
// route level code-splitting
|
||
|
// this generates a separate chunk (about.[hash].js) for this route
|
||
|
// which is lazy-loaded when the route is visited.
|
||
|
component: () =>
|
||
|
import(/* webpackChunkName: "notFound" */ "../views/NotFound.vue")
|
||
|
}
|
||
|
]
|
||
|
|
||
|
const router = new VueRouter({
|
||
|
routes,
|
||
|
mode: "history"
|
||
|
})
|
||
|
|
||
|
export default router
|