From 0a5fbc92c72ff645c6cdc9b4215330f1e2555f44 Mon Sep 17 00:00:00 2001 From: quirinecker Date: Fri, 24 Oct 2025 19:17:55 +0200 Subject: [PATCH] added base path to the vue router --- src/main.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main.ts b/src/main.ts index d9b9a28..0500baf 100644 --- a/src/main.ts +++ b/src/main.ts @@ -8,11 +8,11 @@ import Detail from '@/pages/Detail.vue' const app = createApp(App) const router = createRouter({ - history: createWebHistory(), - routes: [ - { path: '/', component: Home}, - { path: '/:name', component: Detail, props: true} - ] + history: createWebHistory(import.meta.env.BASE_URL), + routes: [ + { path: '/', component: Home }, + { path: '/:name', component: Detail, props: true } + ] }) app.use(router)