Problem
@sentry/webpack-plugin currently supports:
- multiple projects (
project: string[]) for the same Sentry instance - a single
url + a single authToken
For 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:
- keep one plugin instance only for injection (
sourcemaps.disable: "disable-upload"), - upload artifacts to each target instance in CI with
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.:
sentryWebpackPlugin({org: 'my-org',project: 'my-project',release: {name: process.env.RELEASE_VERSION},sourcemaps: {assets: ['build/**/*.js','build/**/*.map']},uploadTargets: [{url: 'https://sentry-staging.example.com',authToken: process.env.SENTRY_AUTH_TOKEN_STAGING},{url: 'https://sentry-prod.example.com',authToken: process.env.SENTRY_AUTH_TOKEN_PROD},],})Expected behavior
- Build artifacts are injected/processed once.
- The same artifacts are uploaded to each configured target.
- Optional per-target overrides (if needed):
org, project, headers. - Works with self-hosted instances as well.
Alternatives considered
- Two plugin instances (one per target): can cause double artifact processing.
- CI-only uploads via
sentry-cli: works, but duplicates plugin logic in CI and adds maintenance overhead.
Environment
@sentry/webpack-plugin: 4.9.0- Sentry self-hosted: 23.6.2
Thanks!
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!