|
| 1 | +import { withSentryConfig } from '@sentry/nextjs'; |
1 | 2 | import type { NextConfig } from 'next'; |
2 | 3 | import createNextIntlPlugin from 'next-intl/plugin'; |
3 | 4 |
|
@@ -50,4 +51,40 @@ const nextConfig: NextConfig = { |
50 | 51 | }, |
51 | 52 | }; |
52 | 53 |
|
53 | | -export default withNextIntl(nextConfig); |
| 54 | +export default withSentryConfig(withNextIntl(nextConfig), { |
| 55 | + // For all available options, see: |
| 56 | + // https://www.npmjs.com/package/@sentry/webpack-plugin#options |
| 57 | + |
| 58 | + org: "devlovers", |
| 59 | + |
| 60 | + project: "devlovers-nextjs", |
| 61 | + |
| 62 | + // Only print logs for uploading source maps in CI |
| 63 | + silent: !process.env.CI, |
| 64 | + |
| 65 | + // For all available options, see: |
| 66 | + // https://docs.sentry.io/platforms/javascript/guides/nextjs/manual-setup/ |
| 67 | + |
| 68 | + // Upload a larger set of source maps for prettier stack traces (increases build time) |
| 69 | + widenClientFileUpload: true, |
| 70 | + |
| 71 | + // Uncomment to route browser requests to Sentry through a Next.js rewrite to circumvent ad-blockers. |
| 72 | + // This can increase your server load as well as your hosting bill. |
| 73 | + // Note: Check that the configured route will not match with your Next.js middleware, otherwise reporting of client- |
| 74 | + // side errors will fail. |
| 75 | + // tunnelRoute: "/monitoring", |
| 76 | + |
| 77 | + webpack: { |
| 78 | + // Enables automatic instrumentation of Vercel Cron Monitors. (Does not yet work with App Router route handlers.) |
| 79 | + // See the following for more information: |
| 80 | + // https://docs.sentry.io/product/crons/ |
| 81 | + // https://vercel.com/docs/cron-jobs |
| 82 | + automaticVercelMonitors: true, |
| 83 | + |
| 84 | + // Tree-shaking options for reducing bundle size |
| 85 | + treeshake: { |
| 86 | + // Automatically tree-shake Sentry logger statements to reduce bundle size |
| 87 | + removeDebugLogging: true, |
| 88 | + }, |
| 89 | + }, |
| 90 | +}); |
0 commit comments