diff --git a/deployables/app/app/entry.client.tsx b/deployables/app/app/entry.client.tsx index e0e52b0b..572f654f 100644 --- a/deployables/app/app/entry.client.tsx +++ b/deployables/app/app/entry.client.tsx @@ -1,21 +1,22 @@ +import * as Sentry from '@sentry/react' import React from 'react' import ReactDOM from 'react-dom/client' import { HydratedRouter } from 'react-router/dom' import './app.css' -import * as Sentry from '@sentry/react' - -Sentry.init({ - dsn: 'https://23cb3bbf49ea43ed9bbaf41199c40d1c@o4508675621912576.ingest.us.sentry.io/4508676926078976', - integrations: [Sentry.browserTracingIntegration()], - // Tracing - tracesSampleRate: 1.0, // Capture 100% of the transactions - // Set 'tracePropagationTargets' to control for which URLs distributed tracing should be enabled - tracePropagationTargets: [ - 'localhost', - /^https:\/\/app\.pilot\.gnosisguild\.org/, - ], -}) +if (process.env.NODE_ENV === 'production') { + Sentry.init({ + dsn: 'https://23cb3bbf49ea43ed9bbaf41199c40d1c@o4508675621912576.ingest.us.sentry.io/4508676926078976', + integrations: [Sentry.browserTracingIntegration()], + // Tracing + tracesSampleRate: 1.0, // Capture 100% of the transactions + // Set 'tracePropagationTargets' to control for which URLs distributed tracing should be enabled + tracePropagationTargets: [ + 'localhost', + /^https:\/\/app\.pilot\.gnosisguild\.org/, + ], + }) +} ReactDOM.hydrateRoot( document, diff --git a/deployables/app/package.json b/deployables/app/package.json index c92cae78..7ce79cd3 100644 --- a/deployables/app/package.json +++ b/deployables/app/package.json @@ -3,7 +3,7 @@ "private": true, "type": "module", "scripts": { - "build": "react-router build", + "build": "NODE_ENV=production react-router build", "dev": "react-router dev", "start": "wrangler dev", "check-types": "react-router typegen && tsc -b",