fix: Set Vercel output directory to static/admin and update deployment documentation to clarify this configuration.

This commit is contained in:
CJACK
2026-02-16 20:38:31 +08:00
parent a6a87853d4
commit 3cf207bcbb
3 changed files with 30 additions and 0 deletions

View File

@@ -132,6 +132,21 @@ Another common root cause (Go monorepo + `internal/`):
This usually happens when the Vercel Go entrypoint imports `internal/...` directly.
This repo now avoids that by using a public bridge package: `api/index.go` -> `ds2api/app` -> `internal/server`.
If you see:
```text
No Output Directory named "public" found after the Build completed.
```
Vercel is validating frontend output against `public`, while this repo emits WebUI assets to `static/admin`.
`vercel.json` now explicitly sets:
```json
"outputDirectory": "static/admin"
```
If you manually changed Output Directory in Project Settings, set it to `static/admin` (or clear it and let repo config apply).
## 4. Reverse Proxy (Nginx)
Disable buffering for SSE:

View File

@@ -131,6 +131,20 @@ Error: Command failed: go build -ldflags -s -w -o .../bootstrap .../main__vc__go
这通常发生在 Vercel Go 入口文件直接 `import internal/...`
当前仓库已通过公开桥接包 `app` 解决:`api/index.go` -> `ds2api/app` -> `internal/server`
若看到类似报错:
```text
No Output Directory named "public" found after the Build completed.
```
说明 Vercel 正在按 `public` 校验前端产物目录。当前仓库前端产物目录是 `static/admin`,已在 `vercel.json` 显式配置:
```json
"outputDirectory": "static/admin"
```
若你在项目设置里手动改过 Output Directory请同步改为 `static/admin` 或清空让仓库配置生效。
## 4. 反向代理Nginx
如果在 Nginx 后挂载,建议关闭缓冲以保证 SSE

View File

@@ -1,6 +1,7 @@
{
"version": 2,
"buildCommand": "npm ci --prefix webui && npm run build --prefix webui",
"outputDirectory": "static/admin",
"functions": {
"api/index.go": {
"includeFiles": "static/admin/**"