mirror of
https://github.com/lobehub/lobehub.git
synced 2026-03-26 13:19:34 +07:00
🔨 chore: add trpc mock.vite stub to stop Vite SPA warmup from traversing server router (#13022)
Made-with: Cursor
This commit is contained in:
7
src/libs/trpc/mock.vite.ts
Normal file
7
src/libs/trpc/mock.vite.ts
Normal file
@@ -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.');
|
||||
};
|
||||
Reference in New Issue
Block a user