Skip to content

ref(build): Use rollup config function for @sentry/browser #4668

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 2, 2022

Conversation

lobsterkatie
Copy link
Member

As part of centralizing and unifying our CDN rollup config, this uses the config generation function introduced in #4650 to generate the config for all browser bundles.

Unlike many of the other PRs in this series, this one does actually have an effect on certain bundles, to wit:

  • _mergeOptions is no longer a protected-from-minifcation property, as it's about to be extracted into a stand-alone function.

  • Up until this point, one difference between the @sentry/browser rollup config and all of the other rollup configs was the former's use of the __SENTRY_NO_DEBUG__ flag to suppress logs in the minified bundles. Rather than add a parameter to the function controlling whether or not each package should use the flag, I decided it was better to just apply the flag to all minified bundles.

Ref: https://getsentry.atlassian.net/browse/WEB-639

@github-actions
Copy link
Contributor

github-actions bot commented Mar 2, 2022

size-limit report

Path Base Size (196498a) Current Size Change
@sentry/browser - ES5 CDN Bundle (gzipped + minified) 19.76 KB 19.75 KB -0.05% 🔽
@sentry/browser - ES5 CDN Bundle (minified) 63.33 KB 63.3 KB -0.06% 🔽
@sentry/browser - ES6 CDN Bundle (gzipped + minified) 18.43 KB 18.42 KB -0.07% 🔽
@sentry/browser - ES6 CDN Bundle (minified) 56.47 KB 56.44 KB -0.06% 🔽
@sentry/browser - Webpack (gzipped + minified) 22.2 KB 22.2 KB 0%
@sentry/browser - Webpack (minified) 76.23 KB 76.23 KB 0%
@sentry/react - Webpack (gzipped + minified) 22.23 KB 22.23 KB 0%
@sentry/nextjs Client - Webpack (gzipped + minified) 46.39 KB 46.39 KB 0%
@sentry/browser + @sentry/tracing - ES5 CDN Bundle (gzipped + minified) 27.25 KB 26.63 KB -2.26% 🔽

@lobsterkatie lobsterkatie requested a review from AbhiPrasad March 2, 2022 07:14
@lobsterkatie lobsterkatie merged commit fb5d4e6 into master Mar 2, 2022
@lobsterkatie lobsterkatie deleted the kmclb-use-rollup-config-function-browser branch March 2, 2022 14:32
AbhiPrasad pushed a commit that referenced this pull request Mar 2, 2022
As part of centralizing and unifying our CDN rollup config, this uses the config generation function introduced in #4650 to generate the config for all browser bundles.

Unlike many of the other PRs in this series, this one does actually have an effect on certain bundles, to wit:

- `_mergeOptions` is no longer a protected-from-minifcation property, as it's about to be extracted into a stand-alone function. (See #4625.)

- Up until this point, one difference between the `@sentry/browser` rollup config and all of the other rollup configs was the former's use of the `__SENTRY_NO_DEBUG__` flag to suppress logs in the minified bundles. Rather than add a parameter to the function controlling whether or not each package should use the flag, I decided it was better to just apply the flag to all minified bundles.
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.

2 participants