|
| 1 | +import { withSentryConfig } from '@sentry/nextjs' |
| 2 | +/** @type {import('next').NextConfig} */ |
| 3 | +const nextConfig = { |
| 4 | + images: { |
| 5 | + domains: [], |
| 6 | + remotePatterns: [ |
| 7 | + { |
| 8 | + protocol: 'https', |
| 9 | + hostname: '**', // for testing purposes allow all domains. TODO restrict to specific domains. |
| 10 | + }, |
| 11 | + ], |
| 12 | + }, |
| 13 | +} |
| 14 | + |
| 15 | +export default withSentryConfig( |
| 16 | + nextConfig, |
| 17 | + { |
| 18 | + // For all available options, see: |
| 19 | + // https://github.com/getsentry/sentry-webpack-plugin#options |
| 20 | + |
| 21 | + // Suppresses source map uploading logs during build |
| 22 | + silent: true, |
| 23 | + org: 'noah-joeris', // TODO: replace with actual organization |
| 24 | + project: 'javascript-nextjs', // TODO: replace with actual project name |
| 25 | + }, |
| 26 | + { |
| 27 | + // For all available options, see: |
| 28 | + // https://docs.sentry.io/platforms/javascript/guides/nextjs/manual-setup/ |
| 29 | + |
| 30 | + // Upload a larger set of source maps for prettier stack traces (increases build time) |
| 31 | + widenClientFileUpload: true, |
| 32 | + |
| 33 | + // Transpiles SDK to be compatible with IE11 (increases bundle size) |
| 34 | + transpileClientSDK: true, |
| 35 | + |
| 36 | + // Route browser requests to Sentry through a Next.js rewrite to circumvent ad-blockers. |
| 37 | + // This can increase your server load as well as your hosting bill. |
| 38 | + // Note: Check that the configured route will not match with your Next.js middleware, otherwise reporting of client- |
| 39 | + // side errors will fail. |
| 40 | + tunnelRoute: '/monitoring', |
| 41 | + |
| 42 | + // Hides source maps from generated client bundles |
| 43 | + hideSourceMaps: true, |
| 44 | + |
| 45 | + // Automatically tree-shake Sentry logger statements to reduce bundle size |
| 46 | + disableLogger: true, |
| 47 | + |
| 48 | + // Enables automatic instrumentation of Vercel Cron Monitors. |
| 49 | + // See the following for more information: |
| 50 | + // https://docs.sentry.io/product/crons/ |
| 51 | + // https://vercel.com/docs/cron-jobs |
| 52 | + automaticVercelMonitors: true, |
| 53 | + }, |
| 54 | +) |
0 commit comments