From ad4bbef65b1621a8f5ef609b459fb75084b909ac Mon Sep 17 00:00:00 2001 From: HsiangNianian Date: Sat, 7 Sep 2024 15:17:33 +0800 Subject: chore: move site dir --- src/router/index.ts | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 src/router/index.ts (limited to 'src/router/index.ts') diff --git a/src/router/index.ts b/src/router/index.ts new file mode 100644 index 0000000..38c65fd --- /dev/null +++ b/src/router/index.ts @@ -0,0 +1,21 @@ +// Composables +import { createRouter, createWebHistory } from 'vue-router' + +const routes = [ + { + path: '/', + component: () => import('@/views/index/index.vue'), + }, + { + path: '/:path(.*)', + name: '404', + component: () => import('@/views/404.vue'), + } +] + +const router = createRouter({ + history: createWebHistory(process.env.BASE_URL), + routes, +}) + +export default router -- cgit v1.2.3-70-g09d2