| Name |
Last commit
|
Last update |
|---|---|---|
| .. | ||
| public | ||
| src | ||
| .dockerignore | ||
| .env.example | ||
| Dockerfile | ||
| components.json | ||
| eslint.config.mjs | ||
| next-env.d.ts | ||
| next.config.mjs | ||
| package.json | ||
| postcss.config.mjs | ||
| tsconfig.json |
NEXT_PUBLIC_API_BASE_URL 是构建期 inline。若 docker compose build 漏带
--env-file apps/pac-web/.env,`${NEXT_PUBLIC_API_BASE_URL}` 插值成空串;
env.ts 原用 `??` 只挡 undefined 挡不住空串 → `new URL(path,'')` 抛
"Failed to construct 'URL': Invalid base URL",登录页直接报错。
改:空/缺失时浏览器端退到同源(prod 反代下 API 与前端同域,天然正确),
SSR 退本地默认。即便构建注入失配,生产也不再硬崩。
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
| Name |
Last commit
|
Last update |
|---|---|---|
| .. | ||
| public | Loading commit data... | |
| src | Loading commit data... | |
| .dockerignore | Loading commit data... | |
| .env.example | Loading commit data... | |
| Dockerfile | Loading commit data... | |
| components.json | Loading commit data... | |
| eslint.config.mjs | Loading commit data... | |
| next-env.d.ts | Loading commit data... | |
| next.config.mjs | Loading commit data... | |
| package.json | Loading commit data... | |
| postcss.config.mjs | Loading commit data... | |
| tsconfig.json | Loading commit data... |