diff --git a/config/webpack.plugins.js b/config/webpack.plugins.js index 74c8324bc..0d63a21b6 100644 --- a/config/webpack.plugins.js +++ b/config/webpack.plugins.js @@ -76,6 +76,14 @@ const plugins = (dev = false, beta = false) => { Buffer: ['buffer', 'Buffer'], }), new ForkTsCheckerWebpackPlugin(), + /** + * Removes error for a missing logger function + * https://github.com/getsentry/sentry-javascript/issues/6596 + * https://docs.sentry.io/platforms/javascript/guides/react/configuration/tree-shaking/#tree-shaking-optional-code + */ + new webpack.DefinePlugin({ + __SENTRY_DEBUG__: false, + }), ...(dev ? [new ReactRefreshWebpackPlugin()] : []), ]; };