Skip to content

build: 提交前端产物 + 构建前清理 dist - #5

Merged
mzrodyu merged 1 commit into
mainfrom
feat/model-pull-button
Sep 10, 2026
Merged

mzrodyu merged 1 commit into
mainfrom
feat/model-pull-button

Conversation

@mzrodyu

@mzrodyu mzrodyu commented Sep 10, 2026

Copy link
Copy Markdown
Owner

PR #4 合入后,main 上只有源码,没有构建产物。由于 dist/ 此前被 gitignore 且部署直接使用 dist/,从 main 部署会继续吐旧 bundle,新界面不生效。

本 PR 补齐:

  • dist/ 入库 —— 拉代码即可更新被服务的前端
  • 构建前清理 dist —— vite 在该仓库未清空 outDir,导致 dist/assets/ 累积了 285 个陈旧 bundle(51MB,最早到 7 月),而实际被引用的只有 4 个文件
  • package.json 新增 clean:distbuild 先清后构建

验证

  • 干净构建后 dist 仅 4 文件 / 418K
  • 服务端 / 引用 index-CkIGdnVN.js,该 bundle 含新增的删除密钥按钮
  • 删除接口实测:DELETE /api/account/api-keys/:id{"deleted":true}

The dist/ output was gitignored and the running instance therefore kept serving
an old bundle, so the new user-group and API-key-delete UI never appeared.

- Track dist/ so pulling the repo updates the served frontend
- Clean dist before building: vite was not emptying outDir here, and the folder
  had accumulated 285 stale bundles (51 MB, back to July) of which only 4 files
  were ever referenced

Co-Authored-By: Claude Code <noreply@anthropic.com>
@mzrodyu
mzrodyu merged commit 529f782 into main Sep 10, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant