💚 Fix sentry not sending events
This commit is contained in:
@ -8,23 +8,26 @@ const withTM = require('next-transpile-modules')([
|
||||
])
|
||||
|
||||
/** @type {import('next').NextConfig} */
|
||||
const nextConfig = {
|
||||
const nextConfig = withTM({
|
||||
reactStrictMode: true,
|
||||
output: 'standalone',
|
||||
experimental: {
|
||||
outputFileTracingRoot: path.join(__dirname, '../../'),
|
||||
},
|
||||
sentry: {
|
||||
hideSourceMaps: true,
|
||||
},
|
||||
}
|
||||
})
|
||||
|
||||
const sentryWebpackPluginOptions = {
|
||||
silent: true,
|
||||
}
|
||||
|
||||
module.exports = withTM(
|
||||
process.env.SENTRY_AUTH_TOKEN
|
||||
? withSentryConfig(nextConfig, sentryWebpackPluginOptions)
|
||||
: nextConfig
|
||||
)
|
||||
module.exports = process.env.NEXT_PUBLIC_SENTRY_DSN
|
||||
? withSentryConfig(
|
||||
{
|
||||
...nextConfig,
|
||||
sentry: {
|
||||
hideSourceMaps: true,
|
||||
},
|
||||
},
|
||||
sentryWebpackPluginOptions
|
||||
)
|
||||
: nextConfig
|
||||
|
@ -4,10 +4,8 @@
|
||||
|
||||
import * as Sentry from '@sentry/nextjs'
|
||||
|
||||
const SENTRY_DSN = process.env.SENTRY_DSN || process.env.NEXT_PUBLIC_SENTRY_DSN
|
||||
|
||||
Sentry.init({
|
||||
dsn: SENTRY_DSN,
|
||||
dsn: process.env.NEXT_PUBLIC_SENTRY_DSN,
|
||||
ignoreErrors: ['ResizeObserver loop limit exceeded'],
|
||||
beforeBreadcrumb(breadcrumb, hint) {
|
||||
try {
|
||||
|
@ -4,9 +4,7 @@
|
||||
|
||||
import * as Sentry from '@sentry/nextjs'
|
||||
|
||||
const SENTRY_DSN = process.env.SENTRY_DSN || process.env.NEXT_PUBLIC_SENTRY_DSN
|
||||
|
||||
Sentry.init({
|
||||
dsn: SENTRY_DSN,
|
||||
dsn: process.env.NEXT_PUBLIC_SENTRY_DSN,
|
||||
ignoreErrors: ['ResizeObserver loop limit exceeded'],
|
||||
})
|
||||
|
Reference in New Issue
Block a user