29 lines
719 B
TypeScript
29 lines
719 B
TypeScript
import { createRouter, createWebHistory } from "vue-router";
|
|
const homeView = () => import("@/views/home.vue");
|
|
|
|
const router = createRouter({
|
|
history: createWebHistory(import.meta.env.BASE_URL),
|
|
routes: [
|
|
{
|
|
path: "/",
|
|
name: "home-page",
|
|
component: homeView,
|
|
children: [
|
|
/**
|
|
* 404 Not Found
|
|
* ref: https://router.vuejs.org/guide/essentials/dynamic-matching.html#catch-all-404-not-found-route
|
|
*/
|
|
{
|
|
path: "/:pathMatch(.*)*",
|
|
name: "NotFound",
|
|
component: () => import("@/views/ErrorNotFoundPage.vue"),
|
|
meta: {
|
|
Auth: true,
|
|
},
|
|
},
|
|
],
|
|
},
|
|
],
|
|
});
|
|
|
|
export default router;
|