mirror of
https://github.com/Powerful-517/yys-editor.git
synced 2026-03-05 06:55:26 +00:00
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:
@@ -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(),
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user