From 5ccde0a121fd5d43bf3690f664dd06d0f7344241 Mon Sep 17 00:00:00 2001 From: imbytecat Date: Thu, 26 Feb 2026 12:09:45 +0800 Subject: [PATCH] =?UTF-8?q?fix(server):=20=E9=81=BF=E5=85=8D=20SSR=20?= =?UTF-8?q?=E5=AF=BC=E5=85=A5=20*.client=20=E6=A8=A1=E5=9D=97=E5=AF=BC?= =?UTF-8?q?=E8=87=B4=E6=9E=84=E5=BB=BA=E5=A4=B1=E8=B4=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/server/AGENTS.md | 4 ++-- apps/server/src/client/{orpc.client.ts => orpc.ts} | 0 apps/server/src/client/query-client.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) rename apps/server/src/client/{orpc.client.ts => orpc.ts} (100%) diff --git a/apps/server/AGENTS.md b/apps/server/AGENTS.md index 350a9a1..6f14096 100644 --- a/apps/server/AGENTS.md +++ b/apps/server/AGENTS.md @@ -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()) diff --git a/apps/server/src/client/orpc.client.ts b/apps/server/src/client/orpc.ts similarity index 100% rename from apps/server/src/client/orpc.client.ts rename to apps/server/src/client/orpc.ts diff --git a/apps/server/src/client/query-client.ts b/apps/server/src/client/query-client.ts index 56c4976..38acc75 100644 --- a/apps/server/src/client/query-client.ts +++ b/apps/server/src/client/query-client.ts @@ -1,5 +1,5 @@ import { createTanstackQueryUtils } from '@orpc/tanstack-query' -import { orpc as orpcClient } from './orpc.client' +import { orpc as orpcClient } from './orpc' export const orpc = createTanstackQueryUtils(orpcClient, { experimental_defaults: {