Skip to content

Commit a115a3a

Browse files
committed
fix(docs): pin Node heap to 8 GB for the VitePress production build
The 44-project docfx expansion generates ~2145 pages and the VitePress production build exceeds Node's default 4.2 GB heap, exiting 134 on ubuntu-latest. The Docs site workflow sets NODE_OPTIONS at the job level; the build-test-coverage workflow does not — so the RouteCheckTests OneTimeSetUp invocation of npm run build OOM-aborted there. Bake the heap setting into the npm script itself by invoking node --max-old-space-size=8192 against the vitepress bin. This avoids shell-prefix env syntax that would break on Windows, avoids adding cross-env as a dependency, and ensures every caller — workflow, test fixture, manual invocation — inherits the heap setting.
1 parent 4f1f6a6 commit a115a3a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

docs/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"predev": "npm run regen",
1010
"dev": "vitepress dev",
1111
"prebuild": "npm run regen",
12-
"build": "vitepress build",
12+
"build": "node --max-old-space-size=8192 node_modules/vitepress/bin/vitepress.js build",
1313
"preview": "vitepress preview",
1414
"check-links": "node scripts/check-broken-links.mjs ."
1515
},

0 commit comments

Comments
 (0)