fix(deploy): build web app for subpath deployment

- workflows use build:app instead of lib build

- inject VITE_APP_BASE_URL for prod/dev paths

- make vite base configurable via env

- update acceptance status for wiki compatibility
This commit is contained in:
2026-02-28 00:30:24 +08:00
parent 8803a35996
commit 92e482e854
4 changed files with 19 additions and 12 deletions

View File

@@ -3,8 +3,15 @@ import { fileURLToPath, URL } from 'node:url'
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
const normalizeBase = (value) => {
if (!value || value === '/') return '/'
const withLeadingSlash = value.startsWith('/') ? value : `/${value}`
return withLeadingSlash.endsWith('/') ? withLeadingSlash : `${withLeadingSlash}/`
}
// https://vitejs.dev/config/
export default defineConfig({
base: normalizeBase(process.env.VITE_APP_BASE_URL || '/'),
plugins: [
vue(),
],