sentry-javascript-bundler-plugins icon indicating copy to clipboard operation
sentry-javascript-bundler-plugins copied to clipboard

Upload sourcemaps for multiple environments

Open taobojlen opened this issue 1 year ago • 0 comments

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 build without the Sentry plugin
  • Deploy this new image to each of our environments
  • After each environment has been deployed, run vite build again 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.

taobojlen avatar May 18 '24 13:05 taobojlen