V8's --js-flags parser stops at the first unrecognized flag and silently
drops everything after it in the same string. --always-compact was removed
from V8 at some point after the versions bundled in Electron ~41; on newer
Electron (confirmed broken on a castlabs v43.0.0+wvcus build) it killed
--optimize-for-size right after it in every js-flags string that had it,
even though --optimize-for-size itself is still valid. Verified via
--v8-options against the actual bundled V8 that gc-global/optimize-for-size/
max-semi-space-size/initial-heap-size are still real flags — only
always-compact needed to go.
Not published to npm, so consumers install it as a git dependency. npm only
runs devDependencies + the prepare lifecycle script for git deps (unlike a
registry install, which skips devDependencies and ships prebuilt dist/ instead),
so without this, dist/ would be missing on install.
Extracted and generalized from hand-tuned memory optimizations in an Electron app
template: memory/GPU/Raspberry-Pi-tiered command-line flags, a runtime GC + total-
process memory monitor with pressure-triggered deep clean, and per-window hide/
minimize memory helpers.