Skip to content

fix: significantly reduce client bundle size#532

Merged
rchl merged 1 commit into
mainfrom
fix/bundle-size
Mar 24, 2023
Merged

fix: significantly reduce client bundle size#532
rchl merged 1 commit into
mainfrom
fix/bundle-size

Conversation

@rchl

@rchl rchl commented Mar 24, 2023

Copy link
Copy Markdown
Member

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.

@rchl
rchl force-pushed the fix/bundle-size branch from a0f4bdf to 3516984 Compare March 24, 2023 11:27
@rchl
rchl merged commit 2297dbc into main Mar 24, 2023
@rchl
rchl deleted the fix/bundle-size branch March 24, 2023 15:57
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