diff --git a/next.config.js b/next.config.js index e148b7b..9099204 100644 --- a/next.config.js +++ b/next.config.js @@ -1,17 +1,7 @@ /* eslint-disable @typescript-eslint/no-var-requires */ -const { - NEXT_PUBLIC_SENTRY_DSN: SENTRY_DSN, - SENTRY_ORG, - SENTRY_PROJECT, - SENTRY_AUTH_TOKEN, - SENTRY_RELEASE, - SOURCE_COMMIT, - SOURCE_BRANCH, - NODE_ENV -} = process.env +// const { withSentryConfig } = require('@sentry/nextjs') const VERSION = require('./package.json').version -const basePath = '' module.exports = { env: { @@ -22,7 +12,5 @@ module.exports = { }, experimental: { scrollRestoration: true - }, - basePath, - externalResolver: true + } } \ No newline at end of file diff --git a/pages/_app.tsx b/pages/_app.tsx index 2153168..becaa33 100644 --- a/pages/_app.tsx +++ b/pages/_app.tsx @@ -35,7 +35,8 @@ Router.events.on('routeChangeError', NProgress.done) Sentry.init({ dsn: process.env.NEXT_PUBLIC_SENTRY_DSN, integrations: [new Integrations.BrowserTracing()], - tracesSampleRate: 1.0 + tracesSampleRate: 1.0, + enabled: process.env.NODE_ENV === 'production' }) const KoreanbotsApp = ({ Component, pageProps, err, cookie }: KoreanbotsProps): JSX.Element => { diff --git a/utils/RequestHandler.ts b/utils/RequestHandler.ts index e4229f5..c9c30f2 100644 --- a/utils/RequestHandler.ts +++ b/utils/RequestHandler.ts @@ -13,7 +13,7 @@ Sentry.init({ new Sentry.Integrations.Http({ tracing: true }) ], tracesSampleRate: 1.0, - enabled: true + enabled: process.env.NODE_ENV === 'production' }) const limiter = rateLimit({