|
| 1 | +import { withSentryConfig } from "@sentry/nextjs"; |
1 | 2 | import type { NextConfig } from "next"; |
2 | 3 |
|
3 | 4 | const nextConfig: NextConfig = { |
4 | 5 | output: "standalone", |
5 | 6 | reactStrictMode: true, |
6 | 7 | }; |
7 | 8 |
|
8 | | -export default nextConfig; |
| 9 | +export default withSentryConfig(nextConfig, { |
| 10 | + // For all available options, see: |
| 11 | + // https://www.npmjs.com/package/@sentry/webpack-plugin#options |
| 12 | + authToken: process.env.NEXT_PUBLIC_SENTRY_AUTH_TOKEN, |
| 13 | + org: process.env.NEXT_PUBLIC_SENTRY_ORG, |
| 14 | + project: process.env.NEXT_PUBLIC_SENTRY_PROJECT, |
| 15 | + |
| 16 | + // Only print logs for uploading source maps in CI |
| 17 | + silent: !process.env.CI, |
| 18 | + |
| 19 | + // For all available options, see: |
| 20 | + // https://docs.sentry.io/platforms/javascript/guides/nextjs/manual-setup/ |
| 21 | + |
| 22 | + // Upload a larger set of source maps for prettier stack traces (increases build time) |
| 23 | + widenClientFileUpload: true, |
| 24 | + |
| 25 | + // Automatically annotate React components to show their full name in breadcrumbs and session replay |
| 26 | + reactComponentAnnotation: { |
| 27 | + enabled: true, |
| 28 | + }, |
| 29 | + |
| 30 | + // Route browser requests to Sentry through a Next.js rewrite to circumvent ad-blockers. |
| 31 | + // This can increase your server load as well as your hosting bill. |
| 32 | + // Note: Check that the configured route will not match with your Next.js middleware, otherwise reporting of client- |
| 33 | + // side errors will fail. |
| 34 | + tunnelRoute: "/monitoring", |
| 35 | + |
| 36 | + // Automatically tree-shake Sentry logger statements to reduce bundle size |
| 37 | + disableLogger: true, |
| 38 | + |
| 39 | + // Enables automatic instrumentation of Vercel Cron Monitors. (Does not yet work with App Router route handlers.) |
| 40 | + // See the following for more information: |
| 41 | + // https://docs.sentry.io/product/crons/ |
| 42 | + // https://vercel.com/docs/cron-jobs |
| 43 | + automaticVercelMonitors: true, |
| 44 | +}); |
0 commit comments