/** @type {import('next').NextConfig} */
const { withSentryConfig } = require('@sentry/nextjs')
const nextConfig = {
reactStrictMode: true,
serverRuntimeConfig: {
buildEnv: process.env.BUILD_ENV
},
publicRuntimeConfig: {
buildEnv: process.env.BUILD_ENV
},
images: {
remotePatterns: [
{
protocol: 'https',
hostname: '**'
}
]
}
}
module.exports = nextConfig
module.exports = withSentryConfig(module.exports, { silent: true })
import * as Sentry from '@sentry/nextjs'
const SENTRY_DSN = process.env.SENTRY_DSN || process.env.NEXT_PUBLIC_SENTRY_DSN
const SENTRY_ENVIRONMENT = process.env.SENTRY_ENVIRONMENT || process.env.ENVIRONMENT
Sentry.init({
dsn: SENTRY_DSN,
environment: SENTRY_ENVIRONMENT,
tracesSampleRate: 0.1,
debug: false,
replaysOnErrorSampleRate: 0.1,
replaysSessionSampleRate: 0.1,
integrations: [
new Sentry.Replay({
maskAllText: true,
blockAllMedia: true
})
]
})
Is there an existing issue for this?
How do you use Sentry?
Sentry Saas (sentry.io)
Which SDK are you using?
@sentry/nextjs
SDK Version
7.70.0
Framework Version
@sentry/nextjs 7.70.0
Link to Sentry event
No response
SDK Setup
next.config
sentry.client.config.js
Steps to Reproduce
next devExpected Result
Not to break the build
Actual Result
Some comments: