diff options
| author | Furkan Sahin <furkan-dev@proton.me> | 2021-04-13 10:02:24 -0500 |
|---|---|---|
| committer | Furkan Sahin <furkan-dev@proton.me> | 2021-04-13 10:02:24 -0500 |
| commit | 569488c24ac0ee5c4cca9adfb0dc3f3aa9e7eca4 (patch) | |
| tree | c4a895432fbf193d5d753c3bb6f22318f45fdd15 /src/router/index.ts | |
| parent | 67b7f56f9aeaf5d32cc07d0d776d2e4e95dea21c (diff) | |
| parent | e14581fb25febd28b8e55ca8e2b24ebafa3abbc2 (diff) | |
Merge pull request #1 from cobraguy/typescript-migration
Migrate to TypeScript
Diffstat (limited to 'src/router/index.ts')
| -rw-r--r-- | src/router/index.ts | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/router/index.ts b/src/router/index.ts new file mode 100644 index 0000000..7a598b3 --- /dev/null +++ b/src/router/index.ts @@ -0,0 +1,27 @@ +import { createRouter, createWebHashHistory } from 'vue-router'; +import Editor from '../views/Editor.vue'; +import About from '../views/About.vue'; + +const routes = [ + { + path: '/', + name: 'About', + component: About, + }, + { + path: '/editor', + name: 'Editor', + // 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/Editor.vue'), + component: Editor, + }, +]; + +const router = createRouter({ + history: createWebHashHistory(), + routes, +}); + +export default router; |
