From e44b43ab7ee631fe784d522884630fbf762345ba Mon Sep 17 00:00:00 2001 From: Volodymyr Vreshch Date: Thu, 13 Aug 2026 12:12:37 +0200 Subject: [PATCH] feat: enable server-side source maps in prod --- Dockerfile | 2 ++ packages/landing/next.config.ts | 2 ++ 2 files changed, 4 insertions(+) diff --git a/Dockerfile b/Dockerfile index 474226f..395f3ca 100644 --- a/Dockerfile +++ b/Dockerfile @@ -35,6 +35,8 @@ COPY --from=build --chown=node:node /app/packages/landing/public ./packages/land ENV HOSTNAME=0.0.0.0 ENV PORT=3000 ENV NODE_ENV=production +# Pairs with experimental.serverSourceMaps so runtime traces resolve to src. +ENV NODE_OPTIONS=--enable-source-maps # Build provenance, baked late so a changing SHA only busts this layer. ARG COMMIT_SHA="" ARG BUILD_TIME="" diff --git a/packages/landing/next.config.ts b/packages/landing/next.config.ts index d302532..8d23170 100644 --- a/packages/landing/next.config.ts +++ b/packages/landing/next.config.ts @@ -11,6 +11,8 @@ const API_URL = const nextConfig: NextConfig = { output: 'standalone', + // Server maps make prod stack traces point at src, not the minified bundle. + experimental: { serverSourceMaps: true }, async redirects() { return [ // Short link to the generic connect guide.