Skip to content
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

fix: significantly reduce client bundle size #547

Merged
merged 1 commit into from
Apr 3, 2023
Merged

fix: significantly reduce client bundle size #547

merged 1 commit into from
Apr 3, 2023

Conversation

rchl
Copy link
Member

@rchl rchl commented Apr 2, 2023

The import * as Sentry from '~@sentry/vue' has prevented tree shaking from working.

Second attempt. This time also handling lazy and exposing all relevant SDK methods on $sentry.

Gzipped savings for the whole client bundle for this module's test fixture:

  • Non-lazy: 208kb -> 140kb
  • Lazy: 430kb -> 340kb

Also greatly reduces duplicated code in lazy and non-lazy plugins, simplifying maintenance. The code of those two was already slightly out of sync.

@rchl rchl merged commit 4f1f3d1 into main Apr 3, 2023
@rchl rchl deleted the fix/tree-shake branch April 3, 2023 09:38
@rchl rchl changed the title chore: publish to npm on release fix: significantly reduce client bundle size Apr 3, 2023
rchl added a commit that referenced this pull request Apr 3, 2023
@rchl rchl mentioned this pull request Sep 27, 2023
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.

1 participant