0

I am trying to deploy a basic react application in elastic beanstalk and when I inspect the browser I can see the source code:

app 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?

Gerardo
  • 175
  • 1
  • 2
  • 9
  • maybe this can help https://stackoverflow.com/questions/51415780/create-react-app-is-showing-all-my-code-in-production-how-to-hide-it – Gunesh Shanbhag Jan 14 '23 at 15:29
  • @GuneshShanbhag Indeed, I have tried it and it's not woking. As you can see my code it is not inside the static folder, is in a folder that maybe elastic beanstalk is using to save it – Gerardo Jan 14 '23 at 15:34

0 Answers0