Server functions: how to preventing leaking server-only code (e.g. secrets) into client javascript?
How to server functions prevent leaking server-only code (secrets) into client bundles?
As I understand, to use server functions, you directly import them via the bundler. This means all the typescript/javascript needed to run the server-side RPC are, at least at bundle time, before tree-shaking, visible in a client bundle.
How is this prevented currently? Is there a better approach?
As I understand, to use server functions, you directly import them via the bundler. This means all the typescript/javascript needed to run the server-side RPC are, at least at bundle time, before tree-shaking, visible in a client bundle.
How is this prevented currently? Is there a better approach?