diff --git a/apps/server/AGENTS.md b/apps/server/AGENTS.md index 7fe8216..9531692 100644 --- a/apps/server/AGENTS.md +++ b/apps/server/AGENTS.md @@ -14,7 +14,6 @@ - **RPC**: ORPC (类型安全 RPC,契约优先) - **构建工具**: Vite + Turbo - **代码质量**: Biome (格式化 + Lint) -- **桌面壳** (可选): Tauri v2 (详见 `src-tauri/AGENTS.md`) ## 依赖管理 @@ -55,23 +54,19 @@ bun add react@catalog: ### 开发 ```bash -bun dev # 使用 Turbo 并行启动 Tauri + Vite 开发服务器 -bun dev:vite # 仅启动 Vite 开发服务器 (localhost:3000) -bun dev:tauri # 启动 Tauri 桌面应用 +bun dev # 启动 Vite 开发服务器 bun db:studio # 打开 Drizzle Studio 数据库管理界面 ``` ### 构建 ```bash -bun build # 完整构建 (Vite → 编译 → Tauri 打包) -bun build:vite # 仅构建 Vite (输出到 .output/) -bun build:compile # 编译为独立可执行文件 (使用 build.ts) -bun build:tauri # 构建 Tauri 桌面安装包 +bun build # 构建 Vite 应用 (输出到 .output/) +bun compile # 编译为独立可执行文件 (使用 build.ts) ``` ### 代码质量 ```bash -bun typecheck # 运行 TypeScript 编译器检查 (tsc -b) +bun typecheck # 运行 TypeScript 类型检查 bun fix # 运行 Biome 自动修复格式和 Lint 问题 biome check . # 检查但不自动修复 biome format --write . # 仅格式化代码 @@ -312,11 +307,9 @@ const mutation = useMutation(orpc.myFeature.create.mutationOptions()) ### 构建问题 -**问题**: Vite 8.0.0-beta.9 与 Nitro 插件存在兼容性问题 -- **错误**: `TypeError: Cannot redefine property: viteMetadata` -- **影响**: `bun run build` 构建失败 -- **解决方案**: 等待 Vite 8.0 正式版发布修复,开发环境(`bun dev`)不受影响 -- **临时方案**: 如需生产构建,可降级到 Vite 5.x 稳定版 +**已解决**: Vite 8.0.0-beta.10 已修复与 Nitro 插件的兼容性问题 +- **当前版本**: Vite 8.0.0-beta.10 + nitro-nightly@3.0.1-20260125 +- **状态**: 构建稳定,开发和生产环境均正常工作 ### 依赖选择经验 @@ -366,5 +359,5 @@ const fingerprint = createHash('sha256') --- -**最后更新**: 2026-01-24 +**最后更新**: 2026-01-26 **项目版本**: 基于 package.json 依赖版本