summary refs log tree commit diff stats
path: root/client/src/router
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/router')
-rw-r--r--client/src/router/index.js25
1 files changed, 25 insertions, 0 deletions
diff --git a/client/src/router/index.js b/client/src/router/index.js
new file mode 100644
index 0000000..4300a69
--- /dev/null
+++ b/client/src/router/index.js
@@ -0,0 +1,25 @@
+import { createRouter, createWebHistory } from 'vue-router'
+import Home from '../views/Home.vue'
+
+const routes = [
+    {
+        path: '/',
+        name: 'Home',
+        component: Home
+    },
+    {
+        path: '/about',
+        name: 'About',
+        // 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: "about" */ '../views/About.vue')
+    }
+]
+
+const router = createRouter({
+    history: createWebHistory(process.env.BASE_URL),
+    routes
+})
+
+export default router