-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
feat(sveltekit): Add sentrySvelteKitPlugin
#7788
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
Conversation
size-limit report 📦
|
* Vite Plugin for the Sentry SvelteKit SDK, taking care of: | ||
* | ||
* - Creating Sentry releases and uploading source maps to Sentry | ||
* - Injecting Sentry.init calls if you use dedicated `sentry.(client|server).config.ts` files |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we think about removing this injection behaviour all together then?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I was sort of debating if we should keep it as an alternative but I think the drawback is that we have to support both ways. Also the init location of hook vs. injected init calls differs slightly in the final bundles. Since IMO hooks are the better choice anyway, I'd say we remove it.
But I suggest we do it in a follow up PR, to make reverting easier if we have to, wdyt?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's do it in a follow up PR!
Remove the `withSentryViteConfig` wrapper in favour of `sentrySvelteKitPlugin` introduced in #7788.
This PR adds the
sentrySvelteKitPlugin
vite plugin to the SvelteKit SDK which will replace thewithSentryViteConfig
wrapper. Currently, this plugin does exactly what the wrapper is doing, namely, adding the injectInitPlugin. In the future, this plugin will also add the source maps plugin.Usage:
I'll remove
withSentryViteConfig
in a follow-up PR, to keep the removal atomic.ref #7787