diff --git a/.env.example b/.env.example index 799046ac34..71357c2d7c 100644 --- a/.env.example +++ b/.env.example @@ -322,3 +322,6 @@ APP_ROUTER_SETTINGS_TEAMS_ENABLED=0 APP_ROUTER_GETTING_STARTED_STEP_ENABLED=0 APP_ROUTER_APPS_ENABLED=0 APP_ROUTER_VIDEO_ENABLED=0 + +# disable setry server source maps +SENTRY_DISABLE_SERVER_WEBPACK_PLUGIN=1 \ No newline at end of file diff --git a/apps/web/next.config.js b/apps/web/next.config.js index 9ac7032c8c..58c928083f 100644 --- a/apps/web/next.config.js +++ b/apps/web/next.config.js @@ -572,6 +572,8 @@ if (!!process.env.NEXT_PUBLIC_SENTRY_DSN) { nextConfig["sentry"] = { autoInstrumentServerFunctions: true, hideSourceMaps: true, + // disable source map generation for the server code + disableServerWebpackPlugin: !!process.env.SENTRY_DISABLE_SERVER_WEBPACK_PLUGIN, }; plugins.push(withSentryConfig); diff --git a/turbo.json b/turbo.json index 149f8ae519..b0ed2de782 100644 --- a/turbo.json +++ b/turbo.json @@ -318,6 +318,7 @@ "SENDGRID_API_KEY", "SENDGRID_EMAIL", "SENDGRID_SYNC_API_KEY", + "SENTRY_DISABLE_SERVER_WEBPACK_PLUGIN", "SLACK_CLIENT_ID", "SLACK_CLIENT_SECRET", "SLACK_SIGNING_SECRET",