Добавить memory policy для frontend build в builder и задокументировать override

This commit is contained in:
2026-05-06 00:05:03 +05:00
parent 1e03411ce5
commit 0a8f4e0c3d
2 changed files with 34 additions and 0 deletions
+11
View File
@@ -47,6 +47,17 @@ bundle_ui() {
(
cd "$ui_src/frontend"
local frontend_node_old_space_size="${FRONTEND_NODE_OLD_SPACE_SIZE:-2048}"
local frontend_node_options="${NODE_OPTIONS:-}"
if [[ "$frontend_node_options" != *"--max-old-space-size="* ]]; then
frontend_node_options="${frontend_node_options:+$frontend_node_options }--max-old-space-size=${frontend_node_old_space_size}"
fi
export NODE_OPTIONS="$frontend_node_options"
log_info "Frontend Node.js options: $NODE_OPTIONS"
"$PNPM_BIN" install --frozen-lockfile
"$PNPM_BIN" run build:prod
)