feat: 后端接线上 React 构建产物,legacy 模板降级为兜底

为什么:前端迁移到 Vite 后,首页应直接返回 frontend/dist/index.html
字节(golden 口径随之变为构建产物原样字节),仅当 dist 未构建时
回退 Jinja2 渲染的 legacy 模板。同步挂载 /assets 静态目录、排除
frontend 的 node_modules/tsbuildinfo 入库、docker 构建只带 dist
不带源码、ruff/pyright 排除 frontend 目录(TS 侧由 tsc+vite 把关)。
This commit is contained in:
snowy-yang committed 2026-09-27 18:35:04 +08:00
1 parent 3a089caff2
commit 8803444755
5 files changed
+44 -18

No files matched your search

+2 -2
View File
@@ -38,7 +38,7 @@ package = false
[tool.ruff]
target-version = "py312"
line-length = 120
extend-exclude = [".venv", ".zcode", "templates", "static", "data"]
extend-exclude = [".venv", ".zcode", "templates", "static", "frontend", "data"]
[tool.ruff.lint]
# E/F 基础错误、I 导入排序、B bugbear、UP 升级、C4 推导式、ASYNC 异步陷阱、S 安全、RUF
@@ -90,7 +90,7 @@ include = [
"music_downloader",
"_mkpkg.py",
]
exclude = [".venv", ".zcode", "data", "downloads", "templates", "static"]
exclude = [".venv", ".zcode", "data", "downloads", "templates", "static", "frontend"]
venvPath = "."
venv = ".venv"
pythonVersion = "3.12"