Repository navigation
Feature request: upload the same sourcemap artifacts to multiple Sentry instances (multiple url/authToken targets) #868
Description
Activity
Thanks for writing in! I'll discuss this with the team and get back to you.
- moved this from Waiting for: Product Owner to No status in GitHub Issues with 👀 3
on Feb 9, 2026 Could you be a more specific about why initializing two plugin instances with different
url/authTokendoesn't work for you, as in what specific problems did you run into? This approach should work fine, if it doesn't then we should fix that. We did have some issues with debug ids being injected twice in the past. This has since been fixed for rollup, but maybe we need to port this to webpack too.Could you be a more specific about why initializing two plugin instances with different
url/authTokendoesn't work for you, as in what specific problems did you run into? This approach should work fine, if it doesn't then we should fix that. We did have some issues with debug ids being injected twice in the past. This has since been fixed for rollup, but maybe we need to port this to webpack too.@nicohrubec thanks for the follow-up. Here are the concrete issues we hit with webpack (
@sentry/webpack-plugin4.9.0):We had two plugin instances in the same build (same
assets/project, differenturl+authTokenfor two self-hosted Sentry targets divided by environment e.g.my.sentry.ioandmy.sentry.test.io).
In this setup, output files are processed twice, and Sentry bootstrap code is injected twice.For example, in one emitted runtime chunk (
runtime.c16a4212.js) we see two identical preambles back-to-back:_sentryDebugIdsinit_sentryModuleMetadatainitSENTRY_RELEASE = { id: "..." }
So for webpack, plugin processing is not idempotent when two instances target the same assets.
With a single plugin instance, duplication disappears.
Current workaround on our side is:
- keep one plugin instance per build target,
- route
url/authTokenvia CI env, - and handle extra upload flows in CI when needed.
This looks very similar to the “double injection” class fixed for rollup in #827.
If helpful, I can provide a minimal repro config/repo.Here is asset example runtime.c16a4212.js
- moved this from Waiting for: Community to Waiting for: Product Owner in GitHub Issues with 👀 3
on Feb 10, 2026 Thanks for providing more details! I will check if I can port the rollup fix to webpack. If you could provide a reproduction that would be great, but no pressure.
- moved this from Waiting for: Product Owner to No status in GitHub Issues with 👀 3
on Feb 10, 2026
Metadata
Metadata
Assignees
Labels
Projects
- StatusShow more project fieldsNo status
Problem
@sentry/webpack-plugincurrently supports:project: string[]) for the same Sentry instanceurl+ a singleauthTokenFor teams that must upload the same build artifacts to multiple self-hosted Sentry instances (for example, staging + production instances with different base URLs and tokens), this becomes hard to do with the plugin alone.
Why this matters
A naive approach is to configure two plugin instances with different
url/authToken.In practice this can lead to double processing/injection of the same output files and can affect sourcemap mapping quality.
Current workaround:
sourcemaps.disable: "disable-upload"),sentry-cli sourcemaps upload.This works, but it moves core plugin use-cases into custom CI scripting.
Feature request
Please support uploading to multiple Sentry instances in a single plugin configuration, e.g.:
Expected behavior
org,project, headers.Alternatives considered
sentry-cli: works, but duplicates plugin logic in CI and adds maintenance overhead.Environment
@sentry/webpack-plugin: 4.9.0Thanks!