nuxt-community / sentry-module

Sentry module for Nuxt 2
https://sentry.nuxtjs.org
MIT License
500 stars 113 forks source link

fix: significantly reduce client bundle size #547

Closed rchl closed 1 year ago

rchl commented 1 year ago

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:

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