FishEye: Tag d2133460ec003f42375d401a6329c35714b65209 refers to a dead (removed) revision in file `arms/vue/src/constants/enums/RoutePath.ts'. FishEye: No comparison available. Pass `N' to diff? Index: arms/vue/src/router/index.ts =================================================================== diff -u -rd07e8d05f1402beebd11a90c45d1d40f0b91afac -r245919eacf31da7c22da85a66eb4b6687e666554 --- arms/vue/src/router/index.ts (.../index.ts) (revision d07e8d05f1402beebd11a90c45d1d40f0b91afac) +++ arms/vue/src/router/index.ts (.../index.ts) (revision 245919eacf31da7c22da85a66eb4b6687e666554) @@ -1,17 +1,24 @@ -import { createRouter, createWebHistory, RouteRecordRaw } from "vue-router"; -import HomeView from "../views/HomeView.vue"; +import { + createRouter, + createWebHistory, + RouteLocationNormalized, + NavigationGuardNext, +} from 'vue-router'; +import routes from '@/router/routes'; -const routes: Array = [ - { - path: "/", - name: "home", - component: HomeView, - }, -]; - const router = createRouter({ - history: createWebHistory(process.env.BASE_URL), - routes, + history: createWebHistory(process.env.BASE_URL), + routes, }); +router.beforeEach( + ( + to: RouteLocationNormalized, + from: RouteLocationNormalized, + next: NavigationGuardNext, + ) => { + next(); + }, +); + export default router; Index: arms/vue/src/router/routes.ts =================================================================== diff -u --- arms/vue/src/router/routes.ts (revision 0) +++ arms/vue/src/router/routes.ts (revision 245919eacf31da7c22da85a66eb4b6687e666554) @@ -0,0 +1,19 @@ +import { RouteRecordRaw } from 'vue-router'; +import { RoutePath } from '@/constants/enums/RoutePath'; + +const routeComponent = (name: string) => () => + import(/* webpackChunkName: "[request]" */ `@views/${name}.vue`); + +const routes: RouteRecordRaw[] = [ + { + path: '/', + redirect: RoutePath.홈, + }, + { + path: RoutePath.홈, + name: 'Home', + component: routeComponent('HomeView'), + }, +]; + +export default routes;