Skip to content

🤯 LobeHub - Super-Agents on Your Team. Add super-agents to the chats your team already uses.They take on work by themselves and get better every week.

🔨 chore: add trpc mock.vite stub to stop Vite SPA warmup from traversing server router (#13022)

Inneiee8eade4859d
diff --git a/src/libs/trpc/mock.vite.ts b/src/libs/trpc/mock.vite.ts
new file mode 100644
index 00000000000..5b23d24437f
--- /dev/null
+++ b/src/libs/trpc/mock.vite.ts
@@ -0,0 +1,7 @@
+/**
+ * Browser-only stub to stop Vite SPA warmup from traversing the server router graph.
+ * The real implementation is only valid in server and test environments.
+ */
+export const createCaller = () => {
+ throw new Error('`@/libs/trpc/mock` is server-only and unavailable in the Vite browser build.');
+};