docs: 统一文档为 pnpm astro sync,避免误导;同步提交 env/tsconfig 调整

This commit is contained in:
2025-11-27 17:29:44 +08:00
parent c38606d675
commit 6302a7baef
5 changed files with 9 additions and 5 deletions
+1 -1
View File
@@ -67,7 +67,7 @@
- Astro 的高保真类型来自 `.astro/types.d.ts`,由 `astro dev``astro sync` 生成。
- Node 要求:`>= 18.20.8`(建议 `>= 20`)。Node 版本不足会导致 `astro sync` 失败,类型退化为 `any`(如 `getCollection(...args: any[]): any`)。
- 操作规范:
- 在“非沙盒/本机环境”执行:`astro sync``pnpm dev`,以生成 `.astro/types.d.ts`
- 在“非沙盒/本机环境”执行:`pnpm astro sync``pnpm dev`,以生成 `.astro/types.d.ts`
- 如在沙盒内执行需要更高权限,请先申请再运行,或直接在沙盒外执行。
- 若类型仍不生效:删除 `.astro/` 后重跑 `pnpm sync`;确保编辑器使用工作区 TypeScript 版本。