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:
Rahul SriRam
2025-08-15 19:58:45 +05:30
committed by GitHub
parent a9166fcb57
commit 4790cb8a30
9 changed files with 21 additions and 31 deletions

View File

@@ -54,11 +54,7 @@ export async function setupApi(config: ProjectConfig) {
if (hasReactWeb) {
if (api === "orpc") {
await addPackageDependency({
dependencies: [
"@orpc/tanstack-query",
"@orpc/client",
"@orpc/server",
],
dependencies: ["@orpc/tanstack-query", "@orpc/client"],
projectDir: webDir,
});
} else if (api === "trpc") {
@@ -79,7 +75,6 @@ export async function setupApi(config: ProjectConfig) {
"@tanstack/vue-query-devtools",
"@orpc/tanstack-query",
"@orpc/client",
"@orpc/server",
],
projectDir: webDir,
});
@@ -90,7 +85,6 @@ export async function setupApi(config: ProjectConfig) {
dependencies: [
"@orpc/tanstack-query",
"@orpc/client",
"@orpc/server",
"@tanstack/svelte-query",
],
projectDir: webDir,
@@ -102,7 +96,6 @@ export async function setupApi(config: ProjectConfig) {
dependencies: [
"@orpc/tanstack-query",
"@orpc/client",
"@orpc/server",
"@tanstack/solid-query",
],
projectDir: webDir,
@@ -123,11 +116,7 @@ export async function setupApi(config: ProjectConfig) {
});
} else if (api === "orpc") {
await addPackageDependency({
dependencies: [
"@orpc/tanstack-query",
"@orpc/client",
"@orpc/server",
],
dependencies: ["@orpc/tanstack-query", "@orpc/client"],
projectDir: nativeDir,
});
}