| # The URL for Web APP, refers to the Web App base URL of WEB service if web app domain is different from | # The URL for Web APP, refers to the Web App base URL of WEB service if web app domain is different from | ||||
| # console or api domain. | # console or api domain. | ||||
| # example: http://udify.app/api | # example: http://udify.app/api | ||||
| NEXT_PUBLIC_PUBLIC_API_PREFIX=http://localhost:5001/api | |||||
| NEXT_PUBLIC_PUBLIC_API_PREFIX=http://localhost:5001/api | |||||
| # SENTRY | |||||
| NEXT_PUBLIC_SENTRY_DSN= | |||||
| NEXT_PUBLIC_SENTRY_ORG= | |||||
| NEXT_PUBLIC_SENTRY_PROJECT= |
| const { withSentryConfig } = require('@sentry/nextjs') | const { withSentryConfig } = require('@sentry/nextjs') | ||||
| const EDITION = process.env.NEXT_PUBLIC_EDITION | |||||
| const IS_CE_EDITION = EDITION === 'SELF_HOSTED' | |||||
| const isDevelopment = process.env.NODE_ENV === 'development' | const isDevelopment = process.env.NODE_ENV === 'development' | ||||
| const isHideSentry = isDevelopment || IS_CE_EDITION | |||||
| const SENTRY_DSN = process.env.NEXT_PUBLIC_SENTRY_DSN | |||||
| const SENTRY_ORG = process.env.NEXT_PUBLIC_SENTRY_ORG | |||||
| const SENTRY_PROJECT = process.env.NEXT_PUBLIC_SENTRY_PROJECT | |||||
| const isHideSentry = isDevelopment || !SENTRY_DSN || !SENTRY_ORG || !SENTRY_PROJECT | |||||
| const withMDX = require('@next/mdx')({ | const withMDX = require('@next/mdx')({ | ||||
| extension: /\.mdx?$/, | extension: /\.mdx?$/, | ||||
| // https://docs.sentry.io/platforms/javascript/guides/nextjs/manual-setup | // https://docs.sentry.io/platforms/javascript/guides/nextjs/manual-setup | ||||
| const sentryWebpackPluginOptions = { | const sentryWebpackPluginOptions = { | ||||
| org: 'perfectworld', | |||||
| project: 'javascript-nextjs', | |||||
| org: SENTRY_ORG, | |||||
| project: SENTRY_PROJECT, | |||||
| silent: true, // Suppresses all logs | silent: true, // Suppresses all logs | ||||
| sourcemaps: { | sourcemaps: { | ||||
| assets: './**', | assets: './**', |
| "prepare": "cd ../ && husky install ./web/.husky" | "prepare": "cd ../ && husky install ./web/.husky" | ||||
| }, | }, | ||||
| "dependencies": { | "dependencies": { | ||||
| "@babel/runtime": "^7.22.3", | |||||
| "@emoji-mart/data": "^1.1.2", | "@emoji-mart/data": "^1.1.2", | ||||
| "@formatjs/intl-localematcher": "^0.2.32", | "@formatjs/intl-localematcher": "^0.2.32", | ||||
| "@headlessui/react": "^1.7.13", | "@headlessui/react": "^1.7.13", | ||||
| "@mdx-js/react": "^2.3.0", | "@mdx-js/react": "^2.3.0", | ||||
| "@next/mdx": "^13.2.4", | "@next/mdx": "^13.2.4", | ||||
| "@sentry/nextjs": "^7.53.1", | "@sentry/nextjs": "^7.53.1", | ||||
| "@sentry/utils": "^7.54.0", | |||||
| "@tailwindcss/line-clamp": "^0.4.2", | "@tailwindcss/line-clamp": "^0.4.2", | ||||
| "@types/crypto-js": "^4.1.1", | "@types/crypto-js": "^4.1.1", | ||||
| "@types/lodash-es": "^4.17.7", | "@types/lodash-es": "^4.17.7", |
| import * as Sentry from '@sentry/nextjs' | import * as Sentry from '@sentry/nextjs' | ||||
| Sentry.init({ | Sentry.init({ | ||||
| dsn: 'https://6bf48a450f054d749398c02a61bae343@o4505264807215104.ingest.sentry.io/4505264809115648', | |||||
| dsn: process.env.NEXT_PUBLIC_SENTRY_DSN, | |||||
| // Replay may only be enabled for the client-side | // Replay may only be enabled for the client-side | ||||
| integrations: [new Sentry.Replay()], | integrations: [new Sentry.Replay()], | ||||
| // Set tracesSampleRate to 1.0 to capture 100% | // Set tracesSampleRate to 1.0 to capture 100% | ||||
| // of transactions for performance monitoring. | // of transactions for performance monitoring. | ||||
| // We recommend adjusting this value in production | // We recommend adjusting this value in production | ||||
| tracesSampleRate: 1.0, | |||||
| tracesSampleRate: 0.1, | |||||
| // Capture Replay for 10% of all sessions, | // Capture Replay for 10% of all sessions, | ||||
| // plus for 100% of sessions with an error | // plus for 100% of sessions with an error |
| import * as Sentry from '@sentry/nextjs' | import * as Sentry from '@sentry/nextjs' | ||||
| Sentry.init({ | Sentry.init({ | ||||
| dsn: 'https://6bf48a450f054d749398c02a61bae343@o4505264807215104.ingest.sentry.io/4505264809115648', | |||||
| dsn: process.env.NEXT_PUBLIC_SENTRY_DSN, | |||||
| // Set tracesSampleRate to 1.0 to capture 100% | // Set tracesSampleRate to 1.0 to capture 100% | ||||
| // of transactions for performance monitoring. | // of transactions for performance monitoring. | ||||
| // We recommend adjusting this value in production | // We recommend adjusting this value in production | ||||
| tracesSampleRate: 1.0, | |||||
| tracesSampleRate: 0.1, | |||||
| // ... | // ... | ||||
| import * as Sentry from '@sentry/nextjs' | import * as Sentry from '@sentry/nextjs' | ||||
| Sentry.init({ | Sentry.init({ | ||||
| dsn: 'https://6bf48a450f054d749398c02a61bae343@o4505264807215104.ingest.sentry.io/4505264809115648', | |||||
| dsn: process.env.NEXT_PUBLIC_SENTRY_DSN, | |||||
| // Set tracesSampleRate to 1.0 to capture 100% | // Set tracesSampleRate to 1.0 to capture 100% | ||||
| // of transactions for performance monitoring. | // of transactions for performance monitoring. | ||||
| // We recommend adjusting this value in production | // We recommend adjusting this value in production | ||||
| tracesSampleRate: 1.0, | |||||
| tracesSampleRate: 0.1, | |||||
| }) | }) |