diff --git a/compose.yml b/compose.yml index bebbf1e..c3c75c3 100644 --- a/compose.yml +++ b/compose.yml @@ -6,7 +6,7 @@ services: context: . dockerfile: Dockerfile args: - VITE_DEV: true + VITE_DEV: false ports: - "8080:80" restart: unless-stopped diff --git a/src/router/index.js b/src/router/index.js index eae0f1f..9e51256 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -19,12 +19,12 @@ const router = createRouter({ routes, }) -router.beforeEach((to, from, next) => { - if (isDevEnabled && to.path !== "/soon") { - next("/soon") - } else { - next() +router.beforeEach((to) => { + if (isDevEnabled) { + return to.path === "/soon" ? true : "/soon" } + + return to.path === "/soon" ? "/" : true }) export default router