feat: restore withSentryConfig build wrapper

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 <noreply@anthropic.com>
This commit is contained in:
Jakob Wennberg
2026-03-02 16:32:29 +01:00
parent 8b057b035d
commit c32bf37a15
+8 -4
View File
@@ -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 } }),
});