aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/router/index.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/router/index.ts')
-rw-r--r--src/router/index.ts26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/router/index.ts b/src/router/index.ts
new file mode 100644
index 0000000..65353da
--- /dev/null
+++ b/src/router/index.ts
@@ -0,0 +1,26 @@
+// Composables
+import { createRouter, createWebHistory } from 'vue-router'
+
+const routes = [
+ {
+ path: '/',
+ component: () => import('@/layouts/default/Default.vue'),
+ children: [
+ {
+ path: '',
+ name: 'Home',
+ // 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: "home" */ '@/views/Home.vue'),
+ },
+ ],
+ },
+]
+
+const router = createRouter({
+ history: createWebHistory(process.env.BASE_URL),
+ routes,
+})
+
+export default router