You can deploy your application to a client’s device or server without exposing your codebase, you can consider this approach.
JavaScript Obfuscator is a powerful free obfuscator for JavaScript, containing a variety of features which provide protection for your source code.