|
| 1 | +import { withSentryConfig } from '@sentry/nextjs'; |
1 | 2 | import { PrismaPlugin } from '@prisma/nextjs-monorepo-workaround-plugin';
|
2 | 3 |
|
3 | 4 | // const headers = [
|
@@ -65,49 +66,42 @@ const nextConfig = {
|
65 | 66 | },
|
66 | 67 | };
|
67 | 68 |
|
68 |
| -export default nextConfig; |
| 69 | +export default withSentryConfig(nextConfig, { |
| 70 | + // For all available options, see: |
| 71 | + // https://github.com/getsentry/sentry-webpack-plugin#options |
69 | 72 |
|
70 |
| -// Injected content via Sentry wizard below |
| 73 | + org: 'dreampip', |
| 74 | + project: 'hypnos', |
71 | 75 |
|
72 |
| -// const { withSentryConfig } = require('@sentry/nextjs'); |
| 76 | + // Only print logs for uploading source maps in CI |
| 77 | + silent: !process.env.CI, |
73 | 78 |
|
74 |
| -// module.exports = withSentryConfig( |
75 |
| -// module.exports, |
76 |
| -// { |
77 |
| -// // For all available options, see: |
78 |
| -// // https://github.com/getsentry/sentry-webpack-plugin#options |
| 79 | + // For all available options, see: |
| 80 | + // https://docs.sentry.io/platforms/javascript/guides/nextjs/manual-setup/ |
79 | 81 |
|
80 |
| -// // Suppresses source map uploading logs during build |
81 |
| -// silent: true, |
82 |
| -// org: 'dreampip', |
83 |
| -// project: 'hypnos', |
84 |
| -// }, |
85 |
| -// { |
86 |
| -// // For all available options, see: |
87 |
| -// // https://docs.sentry.io/platforms/javascript/guides/nextjs/manual-setup/ |
| 82 | + // Upload a larger set of source maps for prettier stack traces (increases build time) |
| 83 | + widenClientFileUpload: true, |
88 | 84 |
|
89 |
| -// // Upload a larger set of source maps for prettier stack traces (increases build time) |
90 |
| -// widenClientFileUpload: true, |
91 |
| - |
92 |
| -// // Transpiles SDK to be compatible with IE11 (increases bundle size) |
93 |
| -// transpileClientSDK: true, |
| 85 | + // Automatically annotate React components to show their full name in breadcrumbs and session replay |
| 86 | + reactComponentAnnotation: { |
| 87 | + enabled: true, |
| 88 | + }, |
94 | 89 |
|
95 |
| -// // Uncomment to route browser requests to Sentry through a Next.js rewrite to circumvent ad-blockers. |
96 |
| -// // This can increase your server load as well as your hosting bill. |
97 |
| -// // Note: Check that the configured route will not match with your Next.js middleware, otherwise reporting of client- |
98 |
| -// // side errors will fail. |
99 |
| -// // tunnelRoute: "/monitoring", |
| 90 | + // Uncomment to route browser requests to Sentry through a Next.js rewrite to circumvent ad-blockers. |
| 91 | + // This can increase your server load as well as your hosting bill. |
| 92 | + // Note: Check that the configured route will not match with your Next.js middleware, otherwise reporting of client- |
| 93 | + // side errors will fail. |
| 94 | + // tunnelRoute: "/monitoring", |
100 | 95 |
|
101 |
| -// // Hides source maps from generated client bundles |
102 |
| -// hideSourceMaps: true, |
| 96 | + // Hides source maps from generated client bundles |
| 97 | + hideSourceMaps: true, |
103 | 98 |
|
104 |
| -// // Automatically tree-shake Sentry logger statements to reduce bundle size |
105 |
| -// disableLogger: true, |
| 99 | + // Automatically tree-shake Sentry logger statements to reduce bundle size |
| 100 | + disableLogger: true, |
106 | 101 |
|
107 |
| -// // Enables automatic instrumentation of Vercel Cron Monitors. |
108 |
| -// // See the following for more information: |
109 |
| -// // https://docs.sentry.io/product/crons/ |
110 |
| -// // https://vercel.com/docs/cron-jobs |
111 |
| -// automaticVercelMonitors: true, |
112 |
| -// }, |
113 |
| -// ); |
| 102 | + // Enables automatic instrumentation of Vercel Cron Monitors. (Does not yet work with App Router route handlers.) |
| 103 | + // See the following for more information: |
| 104 | + // https://docs.sentry.io/product/crons/ |
| 105 | + // https://vercel.com/docs/cron-jobs |
| 106 | + automaticVercelMonitors: true, |
| 107 | +}); |
0 commit comments