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

@@ -17,10 +17,10 @@ jobs:
with:
node-version: '22'
- name: Install dependencies and build
- name: Install dependencies and build web app
run: |
npm install
npm run build
VITE_APP_BASE_URL=/yys-editor/ npm run build:app
- name: Deploy to temporary directory
uses: appleboy/scp-action@v0.1.6

View File

@@ -18,10 +18,10 @@ jobs:
with:
node-version: '22'
- name: Install dependencies and build
- name: Install dependencies and build web app
run: |
npm install
npm run build
VITE_APP_BASE_URL=/yys-editor-dev/ npm run build:app
- name: Deploy to temporary directory
uses: appleboy/scp-action@v0.1.6

View File

@@ -193,18 +193,18 @@
- [x] 用户素材删除与持久化通过(删除后刷新不复活)。
- [ ] 缺失资产降级策略通过(不阻断导出/渲染)。
- [x] Dynamic Group 分组基础行为通过(分组信息写入 `meta.groupId`,复制分组会携带组内节点)。
- [ ] 分组规则静态检查通过(冲突与供火提示正确且可实时更新)。
- [ ] 规则管理通过(规则列表表格化、弹窗编辑、导入导出可用)。
- [x] 分组规则静态检查通过(冲突与供火提示正确且可实时更新)。
- [x] 规则管理通过(规则列表表格化、弹窗编辑、导入导出可用)。
- [ ] 矢量节点快速缩放性能回归通过(无明显卡顿/卡死)。
- [ ] 导出到 wiki 数据兼容通过wiki 侧可 normalize 与预览)。
- [x] 导出到 wiki 数据兼容通过wiki 侧可 normalize 与预览)。
- [ ] 跨项目素材互通通过(同 origin 可复用素材,跨 origin 不互通)。
- [ ] 跨项目规则互通方案确认(共享配置源定义、两侧读取一致)。
- [x] 导出图片时隐藏 Dynamic Group 通过(导出前隐藏,导出后恢复)。
当前状态2026-02-27
- 已通过:5基础启动与构建、用户素材上传与使用、用户素材删除与持久化、Dynamic Group 分组基础行为、导出图片时隐藏 Dynamic Group
- 已通过:8基础启动与构建、用户素材上传与使用、用户素材删除与持久化、Dynamic Group 分组基础行为、分组规则静态检查、规则管理、导出到 wiki 数据兼容、导出图片时隐藏 Dynamic Group
- 部分通过1 项(跨项目规则互通方案确认)。
- 未通过/待验证:7 项(其余项待完整手测或跨仓联调)。
- 未通过/待验证:4 项(其余项待完整手测或跨仓联调)。
逐项状态:
- 基础启动与构建:已通过
@@ -213,10 +213,10 @@
- 用户素材删除与持久化:已通过
- 缺失资产降级策略:未通过(待手测)
- Dynamic Group 分组基础行为:已通过
- 分组规则静态检查:通过(待手测)
- 规则管理(表格化/导入导出):通过(待手测)
- 分组规则静态检查:通过
- 规则管理(表格化/导入导出):通过
- 矢量节点快速缩放性能回归:未通过(待手测)
- 导出到 wiki 数据兼容:通过(待跨仓联测
- 导出到 wiki 数据兼容:通过(2026-02-27 联测通过
- 跨项目素材互通:未通过(待同 origin 联测)
- 跨项目规则互通方案确认部分通过yys-editor 已落地wiki 待读取同源配置)
- 导出图片时隐藏 Dynamic Group已通过

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(),
],