TanStackT
TanStack8mo ago
5 replies
clean-aquamarine

Server routes are imported on the client

Hello,
I've been trying to migrate to devinxi version, but I've got an error while imporing a server-side module only (sharp).

Apparently, client.tsx actually imports server routes (client import router -> router imports
routeTree.gen.ts
->
routeTree.gen.ts
imports server modules (API)).

Should it tree-shake serverRouteTree out on the client?

My debug process was vite --debug with extra logging for what imported what.
Was this page helpful?