create-react-app is showing all my code in production, how to hide it?

前端 未结 7 1722
说谎
说谎 2020-12-08 15:23

In my chrome sources tab, I am able to view all my files by exact folder location. How can I hide them?

These weren\'t the problem in my previous project, w

7条回答
  •  囚心锁ツ
    2020-12-08 15:48

    Make this change in package.json file and you are good to go.

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

提交回复
热议问题