Skip to content

Commit de7d68c

Browse files
committed
chore: remove redundent sentry config and add instrumentation file
1 parent efa81a7 commit de7d68c

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

next.config.mjs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,6 @@ let nextConfig = {
4242
images: {
4343
domains: ["squonk.informaticsmatters.org"],
4444
},
45-
sentry: {
46-
// https://docs.sentry.io/platforms/javascript/guides/nextjs/manual-setup/#use-hidden-source-map
47-
// Added to remove a console message, this will become the default in v8 so can be remove then
48-
hideSourceMaps: true,
49-
},
5045
// Allow mdx content and mdx files as pages
5146
webpack(config, options) {
5247
if (options.isServer) {

src/instrumentation.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
export async function register() {
2+
if (process.env.NEXT_RUNTIME === "nodejs") {
3+
await import("../sentry.server.config");
4+
}
5+
6+
if (process.env.NEXT_RUNTIME === "edge") {
7+
await import("../sentry.edge.config");
8+
}
9+
}

0 commit comments

Comments
 (0)