Skip to content

Commit e3f47c1

Browse files
committed
increase available memory for the nodejs javascript vm (#2356)
coder/code-server#7418
1 parent 7f249ab commit e3f47c1

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

codeserver/ubi9-python-3.12/get_code_server_rpm.sh

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,29 @@ if [[ "$ARCH" == "amd64" || "$ARCH" == "arm64" ||"$ARCH" == "ppc64le" ]]; then
6363
git submodule update --init
6464
source ${NVM_DIR}/nvm.sh
6565
while IFS= read -r src_patch; do echo "patches/$src_patch"; patch -p1 < "patches/$src_patch"; done < patches/series
66+
# https://github.com/microsoft/vscode/issues/243708#issuecomment-2750733077
67+
patch -p1 <<'EOF'
68+
diff --git i/package.json w/package.json
69+
index 925462fb087..dfff96eb051 100644
70+
--- code-server.orig/lib/vscode/package.json
71+
+++ code-server/lib/vscode/package.json
72+
@@ -32,7 +32,7 @@
73+
"watch-extensionsd": "deemon npm run watch-extensions",
74+
"kill-watch-extensionsd": "deemon --kill npm run watch-extensions",
75+
"precommit": "node build/hygiene.js",
76+
- "gulp": "node --max-old-space-size=8192 ./node_modules/gulp/bin/gulp.js",
77+
+ "gulp": "node --max-old-space-size=16384 --optimize-for-size ./node_modules/gulp/bin/gulp.js",
78+
"electron": "node build/lib/electron",
79+
"7z": "7z",
80+
"update-grammars": "node build/npm/update-all-grammars.mjs",
81+
EOF
6682
nvm use ${NODE_VERSION}
6783
npm install
6884
npm run build
85+
# https://github.com/coder/code-server/pull/7418
86+
# node: --optimize-for-size is not allowed in NODE_OPTIONS
87+
export NODE_OPTIONS="--max-old-space-size=16384"
88+
export TERSER_PARALLEL=2
6989
VERSION=${CODESERVER_VERSION/v/} npm run build:vscode
7090
npm run release
7191
npm run release:standalone

0 commit comments

Comments
 (0)