-
-
Notifications
You must be signed in to change notification settings - Fork 7k
Closed as not planned
Description
Description
As a developer of vite-plugin-sentry i've seen many feature requests from users to add option to delete sourcemaps after they become uploaded to external service (Sentry in my case). issue
While there are exist some workarounds, i think better solution would control sourcemaps generation and cleaning processes at Vite level.
Suggested solution
I think it would be perfect to have some option to generate sourcemaps temporary.
// Example of config:
build: {
sourcemap: 'hidden',
sourcemapTemporary: true // by default false
}
When sourcemapTemporary
is false - there are no any changes in Vite behavior.
When sourcemapTemporary
is true - Vite runs as always. At the end of bundling process, Vite removes generated sourcemaps (option is ignored if sourcemap was false).
Alternative
For now there are several possible workarounds (from better to worst):
- Using CI like Jenkins to skip sourcemap files
- Manual removing by using rimraf or similar tool (
vite build && rimraf dist/**/*.map
) - Providing plugin level option to remove sourcemaps (most sourcemap uploaders implemented in this manner at the moment).
Additional context
No response
Validations
- Follow our Code of Conduct
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn't already an issue that request the same feature to avoid creating a duplicate.