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•3mo ago
server routes are stripped away from the generated route tree when building for the client
can you share a reproducer?
like-goldOP•3mo 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•3mo ago
which error do you get?
you can just gitpick as shown here: https://tanstack.com/start/latest/docs/framework/react/quick-start