@@ -60,15 +60,15 @@ export default withSentryConfig(nextConfig, {
6060 org : process . env . SENTRY_ORG ,
6161 project : process . env . SENTRY_PROJECT ,
6262 authToken : process . env . SENTRY_AUTH_TOKEN ,
63-
63+
6464 // Sourcemap configuration optimized for monorepo
6565 sourcemaps : {
6666 disable : false ,
6767 // More comprehensive asset patterns for monorepo
6868 assets : [
6969 ".next/static/**/*.js" ,
7070 ".next/static/**/*.js.map" ,
71- ".next/server/**/*.js" ,
71+ ".next/server/**/*.js" ,
7272 ".next/server/**/*.js.map" ,
7373 ] ,
7474 ignore : [
@@ -97,12 +97,23 @@ export default withSentryConfig(nextConfig, {
9797 telemetry : false ,
9898 silent : process . env . NODE_ENV === 'production' ,
9999 debug : process . env . NODE_ENV === 'development' ,
100-
100+
101101 // Error handling for CI/CD
102102 errorHandler : ( error ) => {
103103 console . warn ( "Sentry build error occurred:" , error . message ) ;
104104 console . warn ( "This might be due to missing Sentry environment variables or network issues" ) ;
105105 // Don't fail the build if Sentry upload fails in monorepo context
106106 return ;
107107 } ,
108+
109+ // Document-Policy header for browser profiling
110+ async headers ( ) {
111+ return [ {
112+ source : "/:path*" ,
113+ headers : [ {
114+ key : "Document-Policy" ,
115+ value : "js-profiling" ,
116+ } , ] ,
117+ } , ] ;
118+ } ,
108119} ) ;
0 commit comments