Avoid bundling server code with client code in a shared package setup
When I'm using HttpClient on the client side in my react app I get server code bundled, because of codesharing.
Let me explain in more detail:
I have 3 packages relevant here: Api (api definition / groups are stored here)
Auth (all auth logic, including errors, middlewares, etc.)
DB (everything db related)
Auth depends on db, api depends on auth.
Now on the client if I do
The api contains server code aswell.
Is there a way to go the trpc route here and just import type Api, that would resolve that
Let me explain in more detail:
I have 3 packages relevant here: Api (api definition / groups are stored here)
Auth (all auth logic, including errors, middlewares, etc.)
DB (everything db related)
Auth depends on db, api depends on auth.
Now on the client if I do
The api contains server code aswell.
Is there a way to go the trpc route here and just import type Api, that would resolve that
