Skip to content

Commit 2ae79dd

Browse files
committed
Optimize build vite/pnpm
1 parent 5cfe236 commit 2ae79dd

File tree

4 files changed

+4
-1
lines changed

4 files changed

+4
-1
lines changed

compose.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ services:
1010
env_file: .env
1111
command: mix phx.server
1212
environment:
13+
- NODE_OPTIONS=--max-old-space-size=4096
1314
- "USER=${USER}"
1415
ports:
1516
- "${CODEBATTLE_PORT}:${CODEBATTLE_PORT}"

make-compose.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ compose-install-mix:
3131
podman-compose run --rm --name codebattle_app app mix deps.get
3232

3333
compose-install-pnpm:
34-
podman-compose run --rm --name codebattle_app app /bin/sh -c 'cd /app/apps/codebattle && pnpm install && pnpm build'
34+
podman-compose run --rm --name codebattle_app app /bin/sh -c 'cd /app/apps/codebattle && pnpm install && pnpm run build:mem'
3535

3636
compose-install: compose-install-mix compose-install-pnpm
3737

services/app/Containerfile.dev

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,4 @@ WORKDIR /app
3636

3737
ARG GIT_HASH
3838
ENV APP_VERSION=$GIT_HASH
39+
ENV NODE_OPTIONS="--max-old-space-size=4096"

services/app/apps/codebattle/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
"watch": "pnpm run dev",
99
"dev": "vite",
1010
"build": "vite build",
11+
"build:mem": "NODE_OPTIONS='--max-old-space-size=4096' pnpm build",
1112
"preview": "vite preview",
1213
"test": "jest",
1314
"test-watch": "jest --watchAll",

0 commit comments

Comments
 (0)