Skip to content

fix: significantly reduce client bundle size#547

Merged
rchl merged 1 commit intomainfrom
fix/tree-shake
Apr 3, 2023
Merged

fix: significantly reduce client bundle size#547
rchl merged 1 commit intomainfrom
fix/tree-shake

Conversation

@rchl
Copy link
Copy Markdown
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