mirror of
https://github.com/FranP-code/create-better-t-stack.git
synced 2025-10-12 23:52:15 +00:00
feat(cli): optimize oRPC client dependencies by removing server dependency (#515)
Co-authored-by: Aman Varshney <amanvarshney.work@gmail.com>
This commit is contained in:
@@ -1,9 +1,8 @@
|
||||
import { createORPCClient } from "@orpc/client";
|
||||
import { RPCLink } from "@orpc/client/fetch";
|
||||
import { createTanstackQueryUtils } from "@orpc/tanstack-query";
|
||||
import type { RouterClient } from "@orpc/server";
|
||||
import { QueryCache, QueryClient } from "@tanstack/react-query";
|
||||
import type { appRouter } from "../../server/src/routers";
|
||||
import type { AppRouterClient } from "../../server/src/routers";
|
||||
{{#if auth}}
|
||||
import { authClient } from "@/lib/auth-client";
|
||||
{{/if}}
|
||||
@@ -30,6 +29,6 @@ export const link = new RPCLink({
|
||||
{{/if}}
|
||||
});
|
||||
|
||||
export const client: RouterClient<typeof appRouter> = createORPCClient(link);
|
||||
export const client: AppRouterClient = createORPCClient(link);
|
||||
|
||||
export const orpc = createTanstackQueryUtils(client);
|
||||
|
||||
Reference in New Issue
Block a user