Skip to content

Commit

Permalink
chore: allow disabling source map generation with env var (#12899)
Browse files Browse the repository at this point in the history
  • Loading branch information
DmytroHryshyn authored Dec 29, 2023
1 parent 16d1adf commit 7579417
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 2 additions & 0 deletions apps/web/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
1 change: 1 addition & 0 deletions turbo.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 7579417

Please sign in to comment.