diff --git a/.env-dist b/.env-dist index cd0816477..6939d28c8 100755 --- a/.env-dist +++ b/.env-dist @@ -162,4 +162,8 @@ MAX_PROFILES_CREATED=100 # Deprecated, these NEXT_PUBLIC_* env vars can be removed when AppConstants is removed: NEXT_PUBLIC_MAX_NUM_ADDRESSES=5 -NEXT_PUBLIC_GA4_MEASUREMENT_ID=G-CXG8K4KW4P \ No newline at end of file +NEXT_PUBLIC_GA4_MEASUREMENT_ID=G-CXG8K4KW4P + +# Used during CI to upload sourcemaps to Sentry. +UPLOAD_SENTRY_SOURCEMAPS=false +SENTRY_AUTH_TOKEN= diff --git a/next.config.js b/next.config.js index 6e74fb109..fc746a4e8 100644 --- a/next.config.js +++ b/next.config.js @@ -8,6 +8,10 @@ import { withSentryConfig } from "@sentry/nextjs"; /** @type {import('next').NextConfig} */ const nextConfig = { productionBrowserSourceMaps: true, + sentry: { + disableServerWebpackPlugin: process.env.UPLOAD_SENTRY_SOURCEMAPS ?? "false", + disableClientWebpackPlugin: process.env.UPLOAD_SENTRY_SOURCEMAPS ?? "false", + }, images: { remotePatterns: [ { @@ -173,8 +177,8 @@ const sentryWebpackPluginOptions = { org: "mozilla", project: "firefox-monitor", - silent: true, // Suppresses all logs + authToken: process.env.SENTRY_AUTH_TOKEN, // For all available options, see: // https://github.com/getsentry/sentry-webpack-plugin#options.