I am trying to deploy a basic react application in elastic beanstalk and when I inspect the browser I can see the source code:
The content of the react app is the default one from create-react-app with default package.json scripts.
The platform on elastic beanstalk is that one Node.js 16 running on 64bit Amazon Linux 2/5.6.3
.
Despite I tried to add GENERATE_SOURCEMAP=false
in npm build script, and try to configure nginx using proxy.conf, I'm unable to hide the var/app/current
folder that is being deployed and has the source code of my react application.
Does someone know how avoid source code to be exposed on elastic beanstalk when deploying it in Node.js platform?