From c32bf37a1562d308f539150fcc8d47edaab539ea Mon Sep 17 00:00:00 2001 From: Jakob Wennberg Date: Mon, 2 Mar 2026 16:32:29 +0100 Subject: [PATCH] feat: restore withSentryConfig build wrapper MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Vercel outage resolved — re-enable Sentry build-time integration for source map uploads when SENTRY_AUTH_TOKEN is configured. Co-Authored-By: Claude Opus 4.6 --- next.config.ts | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/next.config.ts b/next.config.ts index 639203ca..0174789a 100644 --- a/next.config.ts +++ b/next.config.ts @@ -1,4 +1,5 @@ import type { NextConfig } from "next"; +import { withSentryConfig } from "@sentry/nextjs"; const isDev = process.env.NODE_ENV === "development"; @@ -15,6 +16,7 @@ const cspDirectives = [ ].join("; "); const nextConfig: NextConfig = { + output: 'standalone', async headers() { return [ { @@ -50,7 +52,9 @@ const nextConfig: NextConfig = { }, }; -// Sentry runtime error capture works via instrumentation.ts — no build-time -// wrapper needed. Add withSentryConfig() here once SENTRY_ORG, SENTRY_PROJECT, -// and SENTRY_AUTH_TOKEN are configured on Vercel for source map uploads. -export default nextConfig; +export default withSentryConfig(nextConfig, { + silent: !process.env.SENTRY_AUTH_TOKEN, + org: process.env.SENTRY_ORG, + project: process.env.SENTRY_PROJECT, + ...(process.env.SENTRY_AUTH_TOKEN ? {} : { sourcemaps: { disable: true } }), +});