-
Notifications
You must be signed in to change notification settings - Fork 50
Closed
Description
Environment
NodeJS v22 with webpack: 5.99.8
Steps to Reproduce
I have a webpack config file where I have the following sentry webpack plugin code:
Note: in my development environment the env
variable is set to {}
const env = {};
sentryWebpackPlugin({
org: env.SENTRY_ORG,
project: env.SENTRY_PROJECT,
authToken: env.SENTRY_AUTH_TOKEN,
telemetry: false,
disable: !env.SENTRY_AUTH_TOKEN,
silent: ["true", true, 1, "1"].includes(env.SENTRY_SILENT ?? false),
release: {
name: env.SENTRY_RELEASE_NAME,
dist: env.SENTRY_RELEASE_LABEL || (new Date()).toISOString().split("T")[1],
deploy: {
env: env.SENTRY_ENVIRONMENT,
}
},
bundleSizeOptimizations: {
excludeDebugStatements: true,
excludeReplayIframe: true,
excludeReplayShadowDom: true,
excludeReplayWorker: true,
}
}),
For @sentry/webpack-plugin version 3.3.1
and earlier, this worked without issue.
With version 3.4.0
I get the following error:
[sentry-webpack-plugin] Error: The `deploy` option was specified but is missing the required `env` property. Please set the `env` property.
Changing the version back to 3.3.1 resolves this.
Based on the error it seems there is a release.deploy.env check before the sentry webpack plugin checks if it is disabled.
Expected Result
If disable
is set to true, I do not expect any missing input warnings/errors
Actual Result
As stated above, an error about missing a deploy.env.
Metadata
Metadata
Assignees
Labels
No labels
Projects
Status
No status