Skip to content

Commit

Permalink
chore: Exclude Sentry configs when not needed
Browse files Browse the repository at this point in the history
  • Loading branch information
emrysal committed Oct 1, 2024
1 parent 492d8a5 commit 0ca2d0b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions apps/web/instrumentation.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
export async function register() {
if (process.env.NEXT_RUNTIME === "nodejs") {
if (process.env.NEXT_PUBLIC_SENTRY_DSN && process.env.NEXT_RUNTIME === "nodejs") {
await import("./sentry.server.config");
}

if (process.env.NEXT_RUNTIME === "edge") {
if (process.env.NEXT_PUBLIC_SENTRY_DSN && process.env.NEXT_RUNTIME === "edge") {
await import("./sentry.edge.config");
}
}

0 comments on commit 0ca2d0b

Please sign in to comment.