Skip to content

Conversation

@lobsterkatie
Copy link
Member

We hide experimental options behind an _experiments flag. This is fine for folks using our npm packages, but for folks using CDN bundles it's a problem, because until now, we've been mangling the property name _experiments. (Normally, properties starting with a single underscore are private class methods or fields, the names of both of which it's fine to mangle. We therefore use that as our criterion when telling terser what it may and may not touch, and _experiments has been getting swept up by that regex.)

This carves out an exception for _experiments, so that it is no longer mangled.

@lobsterkatie lobsterkatie enabled auto-merge (squash) March 28, 2022 18:26
@github-actions
Copy link
Contributor

size-limit report 📦

Path Size
@sentry/browser - ES5 CDN Bundle (gzipped + minified) 19.65 KB (+0.05% 🔺)
@sentry/browser - ES5 CDN Bundle (minified) 62.74 KB (+0.07% 🔺)
@sentry/browser - ES6 CDN Bundle (gzipped + minified) 18.33 KB (+0.05% 🔺)
@sentry/browser - ES6 CDN Bundle (minified) 56.26 KB (+0.07% 🔺)
@sentry/browser - Webpack (gzipped + minified) 22.8 KB (0%)
@sentry/browser - Webpack (minified) 80.69 KB (0%)
@sentry/react - Webpack (gzipped + minified) 22.84 KB (0%)
@sentry/nextjs Client - Webpack (gzipped + minified) 47.78 KB (0%)
@sentry/browser + @sentry/tracing - ES5 CDN Bundle (gzipped + minified) 25.54 KB (+0.06% 🔺)
@sentry/browser + @sentry/tracing - ES6 CDN Bundle (gzipped + minified) 23.93 KB (+0.06% 🔺)

@lobsterkatie lobsterkatie merged commit adda306 into master Mar 28, 2022
@lobsterkatie lobsterkatie deleted the kmclb-stop-minifiying-_experiments branch March 28, 2022 18:44
lforst pushed a commit that referenced this pull request Mar 29, 2022
We hide experimental options behind an `_experiments` flag. This is fine for folks using our npm packages, but for folks using CDN bundles it's a problem, because until now, we've been mangling the property name `_experiments`. (Normally, properties starting with a single underscore are private class methods or fields, the names of both of which it's fine to mangle. We therefore use that as our criterion when telling terser what it may and may not touch, and `_experiments` has been getting swept up by that regex.)

This carves out an exception for `_experiments`, so that it is no longer mangled.
@AbhiPrasad AbhiPrasad added this to the Pre 7.0.0 Work milestone Apr 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants