From e0ea51c4ffbca841bc71a1d620ffe5bf49a78f57 Mon Sep 17 00:00:00 2001 From: Francesco Novy Date: Tue, 3 Sep 2024 16:00:30 +0200 Subject: [PATCH] Revert "remove size limit" This reverts commit 4386e420291161cbe8d60ec64ecc31302a689849. --- .size-limit.js | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/.size-limit.js b/.size-limit.js index d2211d91d5b0..fea0dc49b559 100644 --- a/.size-limit.js +++ b/.size-limit.js @@ -10,6 +10,25 @@ module.exports = [ gzip: true, limit: '24 KB', }, + { + name: '@sentry/browser - with treeshaking flags', + path: 'packages/browser/build/npm/esm/index.js', + import: createImport('init'), + gzip: true, + limit: '24 KB', + modifyWebpackConfig: function (config) { + const webpack = require('webpack'); + config.plugins.push( + new webpack.DefinePlugin({ + __SENTRY_DEBUG__: false, + __RRWEB_EXCLUDE_SHADOW_DOM__: true, + __RRWEB_EXCLUDE_IFRAME__: true, + __SENTRY_EXCLUDE_REPLAY_WORKER__: true, + }), + ); + return config; + }, + }, { name: '@sentry/browser (incl. Tracing)', path: 'packages/browser/build/npm/esm/index.js',