Merge pull request 'fix(sentry): silence build warning without auth token' (#7) from fix/sentry-no-auth-token-warning into main
Local Build and Deploy / deploy (push) Successful in 1m10s
Local Build and Deploy / deploy (push) Successful in 1m10s
Reviewed-on: #7
This commit is contained in:
commit
3bf63b17de
1 file changed
+10
-2
+10
-2
@@ -85,13 +85,21 @@ const withNextIntl = createNextIntlPlugin("./src/i18n/request.ts");
|
|||||||
|
|
||||||
const config = withNextIntl(nextConfig);
|
const config = withNextIntl(nextConfig);
|
||||||
|
|
||||||
|
// Source-map upload + release creation need SENTRY_AUTH_TOKEN.
|
||||||
|
// Without it, keep the SDK wrapper but skip remote Sentry build steps
|
||||||
|
// so CI/prod compile stays quiet (runtime DSN still works independently).
|
||||||
|
const sentryAuthToken = process.env.SENTRY_AUTH_TOKEN;
|
||||||
|
|
||||||
export default withSentryConfig(config, {
|
export default withSentryConfig(config, {
|
||||||
org: process.env.SENTRY_ORG,
|
org: process.env.SENTRY_ORG,
|
||||||
project: process.env.SENTRY_PROJECT,
|
project: process.env.SENTRY_PROJECT,
|
||||||
authToken: process.env.SENTRY_AUTH_TOKEN,
|
authToken: sentryAuthToken,
|
||||||
silent: !process.env.CI,
|
silent: !process.env.CI,
|
||||||
widenClientFileUpload: true,
|
widenClientFileUpload: true,
|
||||||
sourcemaps: {
|
sourcemaps: {
|
||||||
disable: !process.env.SENTRY_AUTH_TOKEN,
|
disable: !sentryAuthToken,
|
||||||
|
},
|
||||||
|
release: {
|
||||||
|
create: Boolean(sentryAuthToken),
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
Reference in new issue
Block a user