From 6e6d54e614ff699e45757e6ea03aad63adf7a6a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=A4=A9=E9=AA=84?= <5307576@qq.com> Date: Fri, 5 Jun 2026 16:54:48 +0800 Subject: [PATCH] fix: support cms subpath deployment --- src/router/index.ts | 2 +- vite.config.ts | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) 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: {