1+ import { withSentryConfig } from "@sentry/nextjs" ;
12import { createMDX } from "fumadocs-mdx/next" ;
23
34const withMDX = createMDX ( ) ;
@@ -12,4 +13,43 @@ const config = {
1213 } ,
1314} ;
1415
15- export default withMDX ( config ) ;
16+ export default withSentryConfig ( withMDX ( config ) , {
17+ // For all available options, see:
18+ // https://www.npmjs.com/package/@sentry /webpack-plugin#options
19+
20+ org : "prisma-ch" ,
21+
22+ project : "javascript-nextjs" ,
23+
24+ authToken : process . env . SENTRY_AUTH_TOKEN ,
25+ tunnelRoute : "/monitoring" ,
26+
27+ // Only print logs for uploading source maps in CI\
28+ silent : ! process . env . CI ,
29+
30+ // For all available options, see:
31+ // https://docs.sentry.io/platforms/javascript/guides/nextjs/manual-setup/
32+
33+ // Upload a larger set of source maps for prettier stack traces (increases build time)
34+ widenClientFileUpload : true ,
35+
36+ // Uncomment to 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+ webpack : {
43+ // Enables automatic instrumentation of Vercel Cron Monitors. (Does not yet work with App Router route handlers.)
44+ // See the following for more information:
45+ // https://docs.sentry.io/product/crons/
46+ // https://vercel.com/docs/cron-jobs
47+ automaticVercelMonitors : true ,
48+
49+ // Tree-shaking options for reducing bundle size
50+ treeshake : {
51+ // Automatically tree-shake Sentry logger statements to reduce bundle size
52+ removeDebugLogging : true ,
53+ } ,
54+ } ,
55+ } ) ;
0 commit comments