I am trying to compile a React web app into a standalone binary executable to protect the source code before delivering it to a client.
Currently, I have tried:
Obfuscating the JavaScript code using javascript-obfuscator.
Using pkg to compile it into a binary, but it seems to work only for Node.js backend apps, not for front-end React apps.
Multi-stage Docker builds with a distroless image, but this only helps secure the container, not convert React into a binary.
My Questions:
Is there any way to truly compile a React app into a binary (similar to how Electron or Flutter compile apps)?
If not, what are the best practices to secure the React source code before deploying it?
Any guidance or alternative approaches would be greatly appreciated!