diff --git a/package.json b/package.json index 3c7d7cf6f..3eb77a9de 100644 --- a/package.json +++ b/package.json @@ -49,7 +49,7 @@ "lint": "yarn flow", "start": "unset HOST && react-scripts start", "build": "unset HOST && export NODE_OPTIONS=--max-old-space-size=8192 && react-scripts build", - "postbuild": "node scripts/patchUrls.js", + "postbuild": "./scripts/old_space_size.sh && export NODE_OPTIONS=--max-old-space-size=8192 && node scripts/patchUrls.js", "ppostbuild": "react-snap", "test": "react-scripts test", "eject": "react-scripts eject" diff --git a/scripts/old_space_size.sh b/scripts/old_space_size.sh new file mode 100644 index 000000000..c5ef11b7d --- /dev/null +++ b/scripts/old_space_size.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +node -e 'console.log(`*** NODE HEAP LIMIT = ${require("v8").getHeapStatistics().heap_size_limit / (1024 * 1024)} Mb`)'