mirror of
https://github.com/stackrender/stackrender.git
synced 2026-09-10 19:25:44 +00:00
build: raise Node heap for production build
The production build renders thousands of modules and exceeds V8's default heap ceiling, so `npm run build` fails with a JavaScript heap out-of-memory error during "rendering chunks". Set NODE_OPTIONS=--max-old-space-size=8192 on the Vite build step via cross-env (kept portable for Windows), so a fresh clone builds without any manual environment setup. Document the matching Docker memory requirement in DOCKER.md, since the container build hits the same limit when the Docker VM has too little RAM.
This commit is contained in:
+2
-1
@@ -5,7 +5,7 @@
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
"build": "tsc && vite build",
|
||||
"build": "tsc && cross-env NODE_OPTIONS=--max-old-space-size=8192 vite build",
|
||||
"lint": "eslint -c .eslintrc.json ./src/**/**/*.{ts,tsx} --fix",
|
||||
"preview": "vite preview"
|
||||
},
|
||||
@@ -88,6 +88,7 @@
|
||||
"@typescript-eslint/parser": "8.11.0",
|
||||
"@vitejs/plugin-react": "^4.2.1",
|
||||
"autoprefixer": "10.4.19",
|
||||
"cross-env": "^7.0.3",
|
||||
"esbuild": "^0.28.0",
|
||||
"eslint": "^8.57.0",
|
||||
"eslint-config-prettier": "9.1.0",
|
||||
|
||||
Reference in New Issue
Block a user