4d82ed4031
Align index.html with a complete Vite output set and remove 116 orphaned chunks so git clone loads the SPA correctly. Co-authored-by: Cursor <cursoragent@cursor.com>
821 B
821 B
2026-06-09 前端构建产物重建与 prune
摘要
vite build 重新生成 web/app/,并 prune 移除 116 个过期 hash assets,修复 index.html 引用未入库入口 JS 的仓库不一致。
动机
Git 中 index.html 指向 index-Bplw5zZe.js 但未跟踪对应 chunk;clone 后前端白屏。生产容器内构建正常,本修复对齐 Git 与当前源码。
涉及文件
web/app/index.htmlweb/app/assets/*(保留当前构建 178 文件,删除 116 过期)
迁移 / 重启
无 DB 变更。生产下次部署会容器内 rebuild;可选 deploy/deploy-frontend.sh 同步静态资源。
验证
python3 deploy/prune_frontend_assets.py --dry-run web/app # referenced_kept=178 would_remove=0
# index.html 引用的 js/css 均存在于 web/app/assets/