diff --git a/dev-packages/rollup-utils/plugins/bundlePlugins.mjs b/dev-packages/rollup-utils/plugins/bundlePlugins.mjs index 9d6edd3157c0..dde5596bd708 100644 --- a/dev-packages/rollup-utils/plugins/bundlePlugins.mjs +++ b/dev-packages/rollup-utils/plugins/bundlePlugins.mjs @@ -101,7 +101,7 @@ export function makeTerserPlugin() { // mangler won't touch user-facing things, but `sentryWrapped` is not user-facing, and would be mangled during // minification. (We need it in its original form to correctly detect our internal frames for stripping.) All three // are all listed here just for the clarity's sake, as they are all used in the frames manipulation process. - reserved: ['captureException', 'captureMessage', 'sentryWrapped'], + reserved: ['Sentry', 'captureException', 'captureMessage', 'sentryWrapped', 'sW'], properties: { // allow mangling of private field names... regex: /^_[^_]/, @@ -141,6 +141,15 @@ export function makeTerserPlugin() { ], }, }, + compress: { + passes: 5, + ecma: 2020, + unsafe_comps: true, + unsafe_math: true, + pure_getters: true, + unsafe_arrows: true, + unsafe_methods: true, + }, output: { comments: false, },