From 1c837a3aae7a61e166e6c68f58873100cab00cfe Mon Sep 17 00:00:00 2001 From: Arnaud Nelissen Date: Mon, 15 Jun 2026 16:10:49 +0200 Subject: [PATCH] fix(build): use webpack instead of Turbopack for production build MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Turbopack (Next.js 16 default) OOM-kills on low-memory servers — BuildKit loses the connection and reports EOF. Webpack uses significantly less RAM. Also bumped NODE_OPTIONS heap limit to 2048MB. Co-Authored-By: Claude Sonnet 4.6 --- Dockerfile | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 28bd01f..0ba3681 100644 --- a/Dockerfile +++ b/Dockerfile @@ -21,7 +21,7 @@ COPY . . RUN pnpm prisma generate ENV NEXT_TELEMETRY_DISABLED=1 -ENV NODE_OPTIONS="--max-old-space-size=1536" +ENV NODE_OPTIONS="--max-old-space-size=2048" RUN pnpm build # ── runner ────────────────────────────────────────────────────────────────── diff --git a/package.json b/package.json index 5af8b25..58e1db3 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "packageManager": "pnpm@11.6.0", "scripts": { "dev": "next dev", - "build": "next build", + "build": "next build --webpack", "start": "next start", "lint": "eslint" },