Leaking Payload CMS code into client
I'm trying to integrate Paylaod CMS into Tanstack and failing spetacularly. The main problem is that no matter how hard I try to isolate paylaod and not have it leak into the client, it keeps somehow making its way there.
In the end this is the error i get:
this is not a dependency of my project, rather something payload is importing. Here is what im doing:
This all in a failed effort to make sure imports from paylaod and config have nothing to do with client stuf.... where am i going wrong?
2 Replies
exotic-emeraldOP•3mo ago
none of these 2 packages are being imported in this path. This is the only route giving issues.
wise-white•3mo ago
you can wrap with function serverOnly
example: