My understanding is that client-side code is always available if users want to inspect it, so I don’t know that there is a way to hide it.
The server-side code on the other hand is invisible to users, so that is where you will want to put details that relate to security.