Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions apps/sim/next.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { withSentryConfig } from '@sentry/nextjs'
import type { NextConfig } from 'next'
import { env, isTruthy } from './lib/env'
import { isDev, isHosted, isProd } from './lib/environment'
Expand Down Expand Up @@ -225,4 +224,16 @@ const sentryConfig = {
},
}

export default isDev ? nextConfig : withSentryConfig(nextConfig, sentryConfig)
// Conditionally apply Sentry config only in production
let finalConfig = nextConfig

if (!isDev) {
try {
const { withSentryConfig } = require('@sentry/nextjs')
finalConfig = withSentryConfig(nextConfig, sentryConfig)
} catch (error) {
console.warn('Failed to load Sentry config:', error)
}
}

export default finalConfig
2 changes: 1 addition & 1 deletion apps/sim/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@
"rtf-stream-parser": "3.8.0",
"sharp": "0.34.3",
"socket.io": "^4.8.1",
"stripe": "^17.7.0",
"stripe": "^18.0.0",
"tailwind-merge": "^2.6.0",
"tailwindcss-animate": "^1.0.7",
"three": "0.177.0",
Expand Down
Loading