fix(server): 避免 SSR 导入 *.client 模块导致构建失败

This commit is contained in:
2026-02-26 12:09:45 +08:00
parent 0553347bfe
commit 5ccde0a121
3 changed files with 3 additions and 3 deletions

View File

@@ -54,7 +54,7 @@ bun test -t "pattern" # Run tests matching pattern
```
src/
├── client/ # Client-side code
│ ├── orpc.client.ts # ORPC isomorphic client
│ ├── orpc.ts # ORPC isomorphic client
│ └── query-client.ts # TanStack Query client
├── components/ # React components
├── routes/ # TanStack Router file routes
@@ -119,7 +119,7 @@ export const router = os.router({ feature })
### 4. Use in Components
```typescript
import { useSuspenseQuery, useMutation } from '@tanstack/react-query'
import { orpc } from '@/client/orpc.client'
import { orpc } from '@/client/orpc'
const { data } = useSuspenseQuery(orpc.feature.list.queryOptions())
const mutation = useMutation(orpc.feature.create.mutationOptions())