From 42bd3a76576635b0a0ffc35eb54668916997ed0b Mon Sep 17 00:00:00 2001 From: imbytecat Date: Mon, 26 Jan 2026 10:57:42 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E7=A7=BB=E9=99=A4=E8=BF=87?= =?UTF-8?q?=E6=97=B6=20Tauri=20=E6=A1=8C=E9=9D=A2=E5=A3=B3=E8=AF=B4?= =?UTF-8?q?=E6=98=8E=E5=B9=B6=E6=9B=B4=E6=96=B0=E7=89=88=E6=9C=AC=E4=BF=A1?= =?UTF-8?q?=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 移除过时的 Tauri 桌面壳说明,简化开发与构建命令,更新 Vite 兼容性问题为已解决状态并同步最新版本信息。 --- apps/server/AGENTS.md | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) 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 依赖版本