sentry-javascript-bundler-plugins
sentry-javascript-bundler-plugins copied to clipboard
Upload sourcemaps for multiple environments
We're using @sentry/vite-plugin to create releases & upload sourcemaps to Sentry. We have a lot of environments, so this is what our flow looks like:
- Build our Docker image, which runs
vite buildwithout the Sentry plugin - Deploy this new image to each of our environments
- After each environment has been deployed, run
vite buildagain in a post-deploy step, this time with the Sentry plugin configured so it creates the Sentry release w. sourcemaps for that environment.
This is quite inefficient, since we have to build our frontend N+1 times for N environments. Ideally, there would be a way to upload sourcemaps for many environments at once when we build.
Alternatively, if we're using the plugin incorrectly, I'd love to hear it! But I imagine that this is not an uncommon setup.