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 } }), +});