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): Respect user-provided source map generation settings #14885 #14886

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from

Conversation

s1gr1d
Copy link
Member

@s1gr1d s1gr1d commented Jan 2, 2025

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

@s1gr1d s1gr1d requested review from Lms24 and chargome January 2, 2025 13:54
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.

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 {
Copy link
Member

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?

packages/sveltekit/src/vite/sourceMaps.ts Outdated Show resolved Hide resolved
@s1gr1d s1gr1d self-assigned this Jan 7, 2025
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.

SvelteKit: Respect user-provided source map generation settings
3 participants