fix(ci): increase build heap limit from 2GB to 4GB

The codebase grew past the 2GB heap limit with security/monitoring
additions. cross-env in build script overrides CI NODE_OPTIONS, so
the limit must be set in package.json itself.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Martin Porwoll 2026-02-17 12:03:48 +00:00
parent 037835d1de
commit 4e3710655e
2 changed files with 1 additions and 2 deletions

View file

@ -212,7 +212,6 @@ jobs:
- name: Build application - name: Build application
run: pnpm build run: pnpm build
env: env:
NODE_OPTIONS: '--max-old-space-size=4096'
# Minimal env vars for build # Minimal env vars for build
PAYLOAD_SECRET: build-secret-placeholder PAYLOAD_SECRET: build-secret-placeholder
DATABASE_URI: postgresql://placeholder:placeholder@localhost:5432/placeholder DATABASE_URI: postgresql://placeholder:placeholder@localhost:5432/placeholder

View file

@ -5,7 +5,7 @@
"license": "MIT", "license": "MIT",
"type": "module", "type": "module",
"scripts": { "scripts": {
"build": "cross-env NODE_OPTIONS=\"--no-deprecation --max-old-space-size=2048\" next build", "build": "cross-env NODE_OPTIONS=\"--no-deprecation --max-old-space-size=4096\" next build",
"dev": "cross-env NODE_OPTIONS=--no-deprecation next dev", "dev": "cross-env NODE_OPTIONS=--no-deprecation next dev",
"devsafe": "rm -rf .next && cross-env NODE_OPTIONS=--no-deprecation next dev", "devsafe": "rm -rf .next && cross-env NODE_OPTIONS=--no-deprecation next dev",
"generate:importmap": "cross-env NODE_OPTIONS=--no-deprecation payload generate:importmap", "generate:importmap": "cross-env NODE_OPTIONS=--no-deprecation payload generate:importmap",