fix: CI web 构建堆提升至 5120MB,避免低内存优化后仍 OOM

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
zlwuandCursor committed 2026-10-24 15:40:39 +08:00
1 parent 9d93a373ae
commit d6769846f5
2 files changed
+3 -5

No files matched your search

+2 -4
View File
@@ -41,15 +41,13 @@ steps:
image: node:20-bookworm
environment:
NPM_CONFIG_REGISTRY: https://registry.npmmirror.com
CI: 'true'
VITE_LOW_MEM: '1'
VITE_BUILD_COMPRESS: ''
commands:
- set -eu
- echo "==> web tag=${DRONE_TAG} npm=$(npm -v) node=$(node -v) low_mem=${VITE_LOW_MEM}"
- echo "==> web tag=${DRONE_TAG} npm=$(npm -v) node=$(node -v) (build:ci low-mem)"
- mkdir -p "/hzdyjs-releases/${DRONE_TAG}"
- cd web
- npm install --legacy-peer-deps --no-audit --no-fund
# build:ci 内置 CI/VITE_LOW_MEM/关 gzip + 5G 堆(勿在 Drone environment 再声明自定义变量,会被预处理掏空)
- npm run build:ci
- test -f dist/index.html
- tar -C dist -czf "/hzdyjs-releases/${DRONE_TAG}/web-${DRONE_TAG}.tar.gz" .
+1 -1
View File
@@ -9,7 +9,7 @@
"scripts": {
"dev": "vite serve --mode development",
"build:prod": "node --max-old-space-size=6144 node_modules/vite/bin/vite.js build --mode production",
"build:ci": "CI=true VITE_LOW_MEM=1 VITE_BUILD_COMPRESS= node --max-old-space-size=3072 node_modules/vite/bin/vite.js build --mode production",
"build:ci": "CI=true VITE_LOW_MEM=1 VITE_BUILD_COMPRESS= node --max-old-space-size=5120 node_modules/vite/bin/vite.js build --mode production",
"build:dev": "node --max-old-space-size=6144 node_modules/vite/bin/vite.js build --mode development",
"preview": "vite preview",
"lint:eslint": "eslint",