Skip to content

Commit b872d37

Browse files
committed
add auth token
1 parent b6b63ce commit b872d37

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

next.config.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,12 @@ const outputFileTracingExcludes = process.env.NEXT_PUBLIC_DEVELOPER_DOCS
2525

2626
if (
2727
process.env.NODE_ENV !== 'development' &&
28-
(!process.env.NEXT_PUBLIC_SENTRY_DSN || !process.env.SENTRY_DSN)
28+
(!process.env.NEXT_PUBLIC_SENTRY_DSN ||
29+
!process.env.SENTRY_DSN ||
30+
!process.env.SENTRY_WEBPACK_PLUGIN_AUTH_TOKEN)
2931
) {
3032
throw new Error(
31-
'Missing required environment variables: NEXT_PUBLIC_SENTRY_DSN and SENTRY_DSN must be set in production'
33+
'Missing required environment variables: NEXT_PUBLIC_SENTRY_DSN, SENTRY_DSN and SENTRY_WEBPACK_PLUGIN_AUTH_TOKEN must be set in production'
3234
);
3335
}
3436

@@ -67,6 +69,7 @@ const nextConfig = {
6769
module.exports = withSentryConfig(nextConfig, {
6870
org: 'sentry',
6971
project: process.env.NEXT_PUBLIC_DEVELOPER_DOCS ? 'develop-docs' : 'docs',
72+
authToken: process.env.SENTRY_WEBPACK_PLUGIN_AUTH_TOKEN,
7073

7174
// Suppresses source map uploading logs during build
7275
silent: !process.env.CI,

0 commit comments

Comments
 (0)