1in package.json file as follows.
2add GENERATE_SOURCEMAP=false to build
3
4scripts: {
5"build": "GENERATE_SOURCEMAP=false react-scripts build"
6}
1"build": "GENERATE_SOURCEMAP=false react-scripts build",
2"winBuild": "set \"GENERATE_SOURCEMAP=false\" && react-scripts build",
3
4Use npm run build for creating build on Linux.
5
6Use npm run winBuild for creating build on Windows.
1
2In in package.json (Windows)
3
4"scripts": {
5...
6 "cleanBuild": "rimraf ./build/*",
7 "build": "npm run cleanBuild && set \"GENERATE_SOURCEMAP=false\" && react-scripts build ",