### Task 3: sibling `baseURL` 环境变量测试 + 实现（RED→GREEN）

**Files:**
- Modify: `/Users/arthur/data/httpd/ecshopx-demo/ECShopX_web-frontend/nuxt.config.ts`（`app` 块）
- Create（若 sibling 已有 vitest）：优先加单测；否则用本仓 shell 断言读取文件

**Interfaces:**
- Consumes: none
- Produces: `app.baseURL === process.env.NUXT_APP_BASE_URL || '/'`

- [ ] **Step 1: RED — 契约断言（在 ECShopX 仓）**

```bash
#!/bin/bash
# tests/deploy/baota/test-nuxt-baseurl-config.sh
set -euo pipefail
PARENT="$(cd "$(dirname "$0")/../../../.." && pwd)"
CFG="${WEB_FRONTEND_DIR:-$PARENT/ECShopX_web-frontend}/nuxt.config.ts"
test -f "$CFG"
grep -q 'baseURL:' "$CFG"
grep -q 'NUXT_APP_BASE_URL' "$CFG"
grep -qE "baseURL:[[:space:]]*process\.env\.NUXT_APP_BASE_URL[[:space:]]*\|\|[[:space:]]*'/' " "$CFG" \
  || grep -qE 'baseURL: process\.env\.NUXT_APP_BASE_URL \|\| '"'/'" "$CFG"
```

Run → Expected: FAIL until config updated.

- [ ] **Step 2: GREEN — 修改 sibling `app` 块**

在现有 `app: { head: { ... } }` 增加 `baseURL`（保持 head 不变）：

```ts
  app: {
    baseURL: process.env.NUXT_APP_BASE_URL || '/',
    head: {
      title: 'ECSHOPX',
      meta: [
        { charset: 'utf-8' },
        { name: 'viewport', content: 'width=device-width, initial-scale=1' },
      ],
    },
  },
```

- [ ] **Step 3: 再跑契约测试** → exit 0

- [ ] **Step 4: Commit**（分别在两个仓库，仅当用户要求）

---

