Reputation:
In the developer tools I can see my react.js code from src folder. How can I hide it for other?
Upvotes: 1
Views: 2472
Reputation: 322
I have also faced this issue. Please try following:
package.json
scripts: {
"build": "GENERATE_SOURCEMAP=false react-scripts build"
}
or in .env file
GENERATE_SOURCEMAP=false
Please check this url. https://github.com/facebook/create-react-app/issues/4162
Upvotes: 1
Reputation: 2200
if you are using CRA(create react app) and build your project then you only deploy the webpack build output - if you still don't have a deployment process and you are uploading the entire project including the build directory - so you can also disable source maps.
Upvotes: 0