Skip to content

Commit

Permalink
chore: remove redundent sentry config and add instrumentation file
Browse files Browse the repository at this point in the history
  • Loading branch information
OliverDudgeon committed Nov 8, 2024
1 parent efa81a7 commit de7d68c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
5 changes: 0 additions & 5 deletions next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,6 @@ let nextConfig = {
images: {
domains: ["squonk.informaticsmatters.org"],
},
sentry: {
// https://docs.sentry.io/platforms/javascript/guides/nextjs/manual-setup/#use-hidden-source-map
// Added to remove a console message, this will become the default in v8 so can be remove then
hideSourceMaps: true,
},
// Allow mdx content and mdx files as pages
webpack(config, options) {
if (options.isServer) {
Expand Down
9 changes: 9 additions & 0 deletions src/instrumentation.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
export async function register() {
if (process.env.NEXT_RUNTIME === "nodejs") {
await import("../sentry.server.config");
}

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

0 comments on commit de7d68c

Please sign in to comment.