aboutsummaryrefslogtreecommitdiffstats
path: root/src/router/index.ts
diff options
context:
space:
mode:
authorLeonardo Bishop <me@leonardobishop.com>2024-02-15 14:01:30 +0000
committerLeonardo Bishop <me@leonardobishop.com>2024-02-15 14:01:30 +0000
commit2aca4247c5d0c7061a300517178dd31316b65fab (patch)
tree10e145c2b57d76c778bdf1a11191495dcfe191f3 /src/router/index.ts
Initial commit
Diffstat (limited to 'src/router/index.ts')
-rw-r--r--src/router/index.ts23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/router/index.ts b/src/router/index.ts
new file mode 100644
index 0000000..9091d16
--- /dev/null
+++ b/src/router/index.ts
@@ -0,0 +1,23 @@
+import { createRouter, createWebHistory } from 'vue-router'
+import EditorView from '../views/EditorView.vue'
+
+const router = createRouter({
+ history: createWebHistory(import.meta.env.BASE_URL),
+ routes: [
+ {
+ path: '/',
+ name: 'home',
+ component: EditorView
+ },
+ {
+ 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('../views/EditorView.vue')
+ }
+ ]
+})
+
+export default router