diff --git a/src/router/index.ts b/src/router/index.ts index 3384ce29..af9daffa 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -25,7 +25,7 @@ const routes: RouteRecordRaw[] = [ ] const router = createRouter({ - history: createWebHistory(), + history: createWebHistory(import.meta.env.BASE_URL), routes, scrollBehavior: () => ({ top: 0 }) }) diff --git a/vite.config.ts b/vite.config.ts index eee245a5..3e51462d 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -3,6 +3,7 @@ import { defineConfig } from 'vite' import vue from '@vitejs/plugin-vue' export default defineConfig({ + base: '/cms/', plugins: [vue()], resolve: { alias: {