From 975b241a7872aafa183a9bee2a553a416fdf6b8b Mon Sep 17 00:00:00 2001 From: afc163 Date: Wed, 6 May 2026 23:27:08 +0800 Subject: [PATCH] docs: improve Mock gotcha wording in CLAUDE.md Umi auto-discovers mock file changes in most cases. Update the wording to reflect this rather than implying a restart is always needed. Co-Authored-By: Claude Opus 4.7 --- CLAUDE.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CLAUDE.md b/CLAUDE.md index 513087f4..ee40aa3f 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -154,7 +154,7 @@ The CLI also supports MCP server mode: `npx antd mcp` (for IDE integrations). - **`.umi` directory**: Auto-generated by Umi. If dev server behaves unexpectedly, delete `src/.umi` and restart - **Port 8000 in use**: Kill the process (`lsof -ti:8000 | xargs kill`) or use `PORT=3000 npm start` to change it -- **Mock not updating**: Restart dev server after adding new mock files; Umi discovers mocks on startup only +- **Mock not updating**: Umi usually auto-discovers `mock/` and `src/pages/**/_mock.ts` changes. If a new file isn't recognized, try restarting the dev server - **Biome + antd lint**: Both must pass before committing. `npm run lint` runs Biome + tsc; `npx antd lint ./src` runs separately. Do not install ESLint or Prettier — this project uses Biome only - **`src/services/` is auto-generated**: Never edit manually. Run `npm run openapi` to regenerate - **`npm run simple` is irreversible**: Always commit or branch before running it