Home > Software engineering >  Deploy react project to Heroku without source code showing?
Deploy react project to Heroku without source code showing?

Time:08-31

I have a react project I am trying to deploy to heroku. I did so by installing the All the files of my project when you open dev tools and go to sources

CodePudding user response:

Change the build script to include GENERATE_SOURCEMAP=false so that the build commands follow it. This is an intended effect according to this

gaearon

This is expected. You can delete .map files from the build output if you want to disable it, although you'll get console warnings about them missing.

There is no harm in leaving them in though in my opinion. Client code is already available to the user’s machine so there’s no secrets in it.

scripts: {
  "build": "GENERATE_SOURCEMAP=false react-scripts build"
}
  • Related