* Remove Sentry from direct import in instrumentation file * chore: Exclude Sentry configs when not needed
10 lines
300 B
TypeScript
10 lines
300 B
TypeScript
export async function register() {
|
|
if (process.env.NEXT_PUBLIC_SENTRY_DSN && process.env.NEXT_RUNTIME === "nodejs") {
|
|
await import("./sentry.server.config");
|
|
}
|
|
|
|
if (process.env.NEXT_PUBLIC_SENTRY_DSN && process.env.NEXT_RUNTIME === "edge") {
|
|
await import("./sentry.edge.config");
|
|
}
|
|
}
|