Silence Sentry build warnings when no auth token is set.

Skip release creation alongside source-map upload so production compile does not warn about missing SENTRY_AUTH_TOKEN.

Co-authored-by: Cursor <[email protected]>
This commit is contained in:
SimoandCursor committed 2026-07-18 21:32:25 +02:00
1 parent 0aa60f8ec5
commit 549a2fab5c
1 file changed
+10 -2
+10 -2
View File
@@ -85,13 +85,21 @@ const withNextIntl = createNextIntlPlugin("./src/i18n/request.ts");
const config = withNextIntl(nextConfig);
// Source-map upload + release creation need SENTRY_AUTH_TOKEN.
// Without it, keep the SDK wrapper but skip remote Sentry build steps
// so CI/prod compile stays quiet (runtime DSN still works independently).
const sentryAuthToken = process.env.SENTRY_AUTH_TOKEN;
export default withSentryConfig(config, {
org: process.env.SENTRY_ORG,
project: process.env.SENTRY_PROJECT,
authToken: process.env.SENTRY_AUTH_TOKEN,
authToken: sentryAuthToken,
silent: !process.env.CI,
widenClientFileUpload: true,
sourcemaps: {
disable: !process.env.SENTRY_AUTH_TOKEN,
disable: !sentryAuthToken,
},
release: {
create: Boolean(sentryAuthToken),
},
});