title: How to remove source files during production deployment of a react application
body: <p>Im trying to deploy an application build using react and i wanted to know what all security measures i need to take while pushing to production.</p>
  <p>I ran <code>npm run build</code> command and i got the build folder structure as shown below.</p>
  <p><a href="https://i.stack.imgur.com/NbTHh.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/NbTHh.png" alt="folder structure after running 'npm run build' command" /></a></p>
  <p>Then i deployed this build folder to production site and i can see from my browser console that my source files are also present as shown in following screenshot.</p>
  <p><a href="https://i.stack.imgur.com/hXHOO.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/hXHOO.png" alt="console view from production site" /></a></p>
  <p>How do i remove these source files from production so that users wont get to see my source code and they will only see the minified files?</p>
  <p>What all security measures should be taken before deploying to production?</p>