1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071 |
- const { withSentryConfig } = require('@sentry/nextjs')
- const isDevelopment = process.env.NODE_ENV === 'development'
- 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')({
- extension: /\.mdx?$/,
- options: {
-
-
-
- remarkPlugins: [],
- rehypePlugins: [],
-
-
- },
- })
- const nextConfig = {
- productionBrowserSourceMaps: false,
-
- pageExtensions: ['ts', 'tsx', 'js', 'jsx', 'md', 'mdx'],
- experimental: {
- appDir: true,
- },
-
- eslint: {
-
-
- ignoreDuringBuilds: true,
- },
- typescript: {
-
- ignoreBuildErrors: true,
- },
- async redirects() {
- return [
- {
- source: '/',
- destination: '/apps',
- permanent: false,
- },
- ]
- },
- ...(isHideSentry
- ? {}
- : {
- sentry: {
- hideSourceMaps: true,
- },
- }),
- }
- const sentryWebpackPluginOptions = {
- org: SENTRY_ORG,
- project: SENTRY_PROJECT,
- silent: true,
- sourcemaps: {
- assets: './**',
- ignore: ['./node_modules/**'],
- },
-
- }
- module.exports = isHideSentry ? withMDX(nextConfig) : withMDX(withSentryConfig(nextConfig, sentryWebpackPluginOptions))
|