Skip to content

Commit

Permalink
Merge pull request #693 from UKHSA-Internal/increase_max-old-space-si…
Browse files Browse the repository at this point in the history
…ze_for_postbuild

Increase max-old-space-size value for postbuild
  • Loading branch information
adebayoolabintan authored Oct 6, 2023
2 parents 1b3d6b1 + bc3e943 commit 7c56ce5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
3 changes: 3 additions & 0 deletions scripts/old_space_size.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/sh

node -e 'console.log(`*** NODE HEAP LIMIT = ${require("v8").getHeapStatistics().heap_size_limit / (1024 * 1024)} Mb`)'

0 comments on commit 7c56ce5

Please sign in to comment.