T
TanStack6mo ago
unwilling-turquoise

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
vicious-gold
vicious-gold6mo ago
server routes are stripped away from the generated route tree when building for the client can you share a reproducer?
unwilling-turquoise
unwilling-turquoiseOP6mo 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?
vicious-gold
vicious-gold6mo 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?