From bd2163897a73d5ff60cb0546468ee91107d16af9 Mon Sep 17 00:00:00 2001 From: Dhravya Shah Date: Tue, 30 Jul 2024 21:18:20 -0700 Subject: [PATCH] enable sentry using tree shaking --- apps/web/next.config.mjs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/apps/web/next.config.mjs b/apps/web/next.config.mjs index c0001fa5..9e0e6e98 100644 --- a/apps/web/next.config.mjs +++ b/apps/web/next.config.mjs @@ -9,6 +9,20 @@ const baseNextConfig = { env: { TELEGRAM_BOT_TOKEN: process.env.TELEGRAM_BOT_TOKEN, }, + webpack: (config, { webpack }) => { + config.plugins.push( + new webpack.DefinePlugin({ + __SENTRY_DEBUG__: false, + __SENTRY_TRACING__: false, + __RRWEB_EXCLUDE_IFRAME__: true, + __RRWEB_EXCLUDE_SHADOW_DOM__: true, + __SENTRY_EXCLUDE_REPLAY_WORKER__: true, + }), + ); + + // return the modified config + return config; + }, }; let selectedCofig = baseNextConfig;