user11483010
user11483010

Reputation:

How can I hide the code from Chrome dev tools source?

In the developer tools I can see my react.js code from src folder. How can I hide it for other?

https://prnt.sc/onb72q

Upvotes: 1

Views: 2472

Answers (2)

Yery cs
Yery cs

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

Ponpon32
Ponpon32

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

Related Questions