Up until now I always put my
client side and
server side utils on the same file
but maybe this approach is better and more secure
---Utils ------ClientUtils.ts ------ServerUtils.ts ------SharedUtils.ts
This method makes it clearer which code is intended to run on the client side and which code is designed to run on the server side, which can help you manage and comprehend your codebase more easily.
Let's assume we are doing named imports
Is using 1st method can expose some server side utils in the client side?
Latest comments (0)