GENERATE_SOURCEMAP=false Issue GENERATE_SOURCEMAP=false Issue reactjs reactjs

GENERATE_SOURCEMAP=false Issue


Keep this in package.json:

"build": "GENERATE_SOURCEMAP=false react-scripts build","winBuild": "set \"GENERATE_SOURCEMAP=false\" && react-scripts build",

Use npm run build for creating build on Linux.

Use npm run winBuild for creating build on Windows.


Another solution is to create a new file in your project's root directory named .env and include the following inside the file. This will remove any .map files from your build/static/js folder the next time you run build.

GENERATE_SOURCEMAP=false