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

feat(sveltekit): Add bundle size optimizations to plugin options #13318

Merged
merged 5 commits into from
Aug 12, 2024

Conversation

s1gr1d
Copy link
Member

@s1gr1d s1gr1d commented Aug 12, 2024

Makes it possible to add bundle size optimizations along with source maps options to the SvelteKit plugin options like this:

      sourceMapsUploadOptions: {
        authToken: 'token',
        org: 'org',
        project: 'project',
      },
      bundleSizeOptimizations: {
        excludePerformanceMonitoring: true,
        excludeTracing: true
      },

A bit of refactoring was done as well in the PR:

  • exported all types necessary for the plugin from ./types
  • create a function generateVitePluginOptions which merges all SvelteKit plugin options correctly to create the Vite Plugin options (+ tests for this function)

part of #13011

@s1gr1d s1gr1d requested review from Lms24, a team and AbhiPrasad and removed request for a team August 12, 2024 11:37
@mydea
Copy link
Member

mydea commented Aug 12, 2024

hmm, now that I look at this - maybe it would make more sense to add the excludeTracing option upstream to the plugins, instead of aliasing this everywhere? 😅 Would simplify this, we can soft deprecate (=stop documenting) the excludePerformance option there and just go with tracing going forward...?

We can still merge this as-is and then remove the alias once we published this upstream & bumped this in here, though!

@s1gr1d
Copy link
Member Author

s1gr1d commented Aug 12, 2024

This was already done in this PR and and I just saw it is also released: https://github.com/getsentry/sentry-javascript-bundler-plugins/releases/tag/2.22.0

I will update the version :)

Copy link
Member

@Lms24 Lms24 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for cleaning up the option merging logic!

@s1gr1d s1gr1d merged commit 4e6c02c into develop Aug 12, 2024
126 checks passed
@s1gr1d s1gr1d deleted the sig/sveltekit-tracing-build-option branch August 12, 2024 12:52
s1gr1d added a commit that referenced this pull request Aug 13, 2024
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.

3 participants