In in package.json (Windows) "scripts": { ... "cleanBuild": "rimraf ./build/*", "build": "npm run cleanBuild && set "GENERATE_SOURCEMAP=false" && react-scripts build ",