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 #532

Merged
merged 1 commit into from
Mar 24, 2023
Merged

fix: significantly reduce client bundle size #532

merged 1 commit into from
Mar 24, 2023

Conversation

rchl
Copy link
Member

@rchl rchl commented Mar 24, 2023

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

This results in about 221KB reduction when using tracing and a bit less when not using tracing (that's weird, yes, but looks like related to Sentry SDK itself).

Unfortunately it doesn't benefit when using lazy loading. Maybe there is a way to handle it using webpack's magic comments in

const Sentry = await import(/* <%= magicComments.join(', ') %> */ '~@sentry/vue')
but I haven't investigated at that point.

EDIT: There is a webpack magic comment webpackExports but it's only available from webpack 5.

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