From 892b55662ec7b2c5bacb493f0033403ff5f94051 Mon Sep 17 00:00:00 2001 From: Victor Hugo dos Santos <115753265+victorvhs017@users.noreply.github.com> Date: Fri, 5 Sep 2025 16:44:46 +0700 Subject: [PATCH] chore: conditionally enable Sentry plugin based on authentication token (#6502) --- apps/web/next.config.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/web/next.config.mjs b/apps/web/next.config.mjs index d74dc1ce52..ab376180b6 100644 --- a/apps/web/next.config.mjs +++ b/apps/web/next.config.mjs @@ -439,6 +439,6 @@ const sentryOptions = { // Always enable Sentry plugin to inject Debug IDs // Runtime Sentry reporting still depends on DSN being set via environment variables -const exportConfig = withSentryConfig(nextConfig, sentryOptions); +const exportConfig = process.env.SENTRY_AUTH_TOKEN ? withSentryConfig(nextConfig, sentryOptions) : nextConfig; export default exportConfig;