feat(sveltekit): Add sentrySvelteKitPlugin#7788
Merged
Conversation
Contributor
size-limit report 📦
|
AbhiPrasad
reviewed
Apr 7, 2023
| * 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 |
Contributor
There was a problem hiding this comment.
should we think about removing this injection behaviour all together then?
Member
Author
There was a problem hiding this comment.
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?
Contributor
There was a problem hiding this comment.
let's do it in a follow up PR!
AbhiPrasad
approved these changes
Apr 7, 2023
Lms24
added a commit
that referenced
this pull request
Apr 7, 2023
Remove the `withSentryViteConfig` wrapper in favour of `sentrySvelteKitPlugin` introduced in #7788.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds the
sentrySvelteKitPluginvite plugin to the SvelteKit SDK which will replace thewithSentryViteConfigwrapper. 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
withSentryViteConfigin a follow-up PR, to keep the removal atomic.ref #7787