-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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): Respect user-provided source map generation settings #14886
Conversation
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.
I thought about moving this parts of this logic to the sentryVitePlugin in general.
This sounds reasonable to me. The base plugin's deletion behaviour is also problematic on its own as reported in #14131. I'm looking into this right now but maybe the answer really is to just handle deletion within our sentrySvelteKit
Vite plugin
}; | ||
}, | ||
sentryPluginOptions?: CustomSentryVitePluginOptions, | ||
): UserSourceMapSetting { |
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.
I see that we don't use this return value other than in tests. We'll need the return value for when we can automatically configure filesToDeleteAfterUpload
, right?
28884c0
to
cb3794e
Compare
cb3794e
to
afc53f6
Compare
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.
Thanks for taking care of this! Just a concern about testing. Implementation looks great to me other than two small remarks
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.
Looks good, I would just second what Lukas said about the export for mocking sourceMapSetting
!
Okay, I made several changes:
I'll open a small follow-up PR to unify logging a bit more but this has a larger area than source maps, so it should be its own PR. |
❌ 1 Tests Failed:
View the top 1 failed tests by shortest run time
To view more test analytics, go to the Test Analytics Dashboard |
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 merge this
Enables
hidden
source maps if source maps are unset. In case they are explicitly disabled or enabled the setting is kept as is.Still need to figure out how to set
filesToDeleteAfterUpload
as this setting needs to be passed when "calling" the sentry Vite plugin. However,filesToDeleteAfterUpload
is dependent on the Vite options and we only have access to the Vite options when creating the custom plugin.I thought about moving this parts of this logic to the
sentryVitePlugin
in general.closes #14885