T
TanStack3mo ago
like-gold

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.
3 Replies
fascinating-indigo
fascinating-indigo3mo ago
server routes are stripped away from the generated route tree when building for the client can you share a reproducer?
like-gold
like-goldOP3mo ago
Is there a devinxi boilerplate at the moment I can start with? Is there a way to debug what vite dev is building right now so I can verify all the imports are going via client build?
fascinating-indigo
fascinating-indigo3mo ago
which error do you get? you can just gitpick as shown here: https://tanstack.com/start/latest/docs/framework/react/quick-start

Did you find this page helpful?