@@ -5,13 +5,16 @@ const nextConfig = {
55 reactStrictMode : true ,
66 experimental : { forceSwcTransforms : true } ,
77 output : 'standalone' ,
8- hideSourceMaps : true ,
9- productionBrowserSourceMaps : false ,
8+ productionBrowserSourceMaps : true ,
109 webpack : ( config , options ) => {
1110 config . module . rules . push ( {
1211 test : / \. s v g $ / i,
1312 use : [ options . defaultLoaders . babel , { loader : '@svgr/webpack' , options : { babel : false } } ] ,
1413 } ) ;
14+ if ( ! options . dev ) {
15+ config . devtool =
16+ process . env . NODE_ENV === 'production' ? 'hidden-source-map' : 'inline-source-map' ;
17+ }
1518
1619 return config ;
1720 } ,
@@ -23,42 +26,21 @@ const nextConfig = {
2326 ] ,
2427 } ,
2528} ;
26- export default withSentryConfig ( nextConfig , {
27- // For all available options, see:
28- // https://github.com/getsentry/sentry-webpack-plugin#options
29-
30- org : 'velog-dashboard' ,
31- project : 'velog-dashboard-fe' ,
32-
33- // Only print logs for uploading source maps in CI
34- silent : ! process . env . CI ,
35-
36- // For all available options, see:
37- // https://docs.sentry.io/platforms/javascript/guides/nextjs/manual-setup/
3829
39- // Upload a larger set of source maps for prettier stack traces (increases build time)
40- widenClientFileUpload : true ,
41-
42- // Automatically annotate React components to show their full name in breadcrumbs and session replay
43- reactComponentAnnotation : {
44- enabled : true ,
45- } ,
30+ export default withSentryConfig ( nextConfig , {
31+ // 센트리 동작을 위한 기본값
32+ authToken : process . env . NEXT_PUBLIC_SENTRY_AUTH_TOKEN ,
33+ org : 'velog-dashboardv2' ,
34+ project : 'vd-fe' ,
4635
47- // Route browser requests to Sentry through a Next.js rewrite to circumvent ad-blockers.
48- // This can increase your server load as well as your hosting bill.
49- // Note: Check that the configured route will not match with your Next.js middleware, otherwise reporting of client-
50- // side errors will fail.
51- tunnelRoute : '/monitoring' ,
36+ widenClientFileUpload : true , // 파일의 크기가 비교적 큰 대신, 더 상세한 정보를 포함하는 소스맵 파일 생성
37+ sourcemaps : { deleteSourcemapsAfterUpload : true } , // 소스맵 파일 업로드 후 자동 제거
38+ hideSourceMaps : true , // 클라이언트 대상의 소스맵 파일 은닉
5239
53- // Hides source maps from generated client bundles
54- hideSourceMaps : true ,
40+ silent : ! process . env . CI , // CI 진행시에만 로그가 표시되도록 강제
41+ disableLogger : true , // 번들 사이즈 감소를 위해 센트리 기본 로그 메세지 트리셰이크
5542
56- // Automatically tree-shake Sentry logger statements to reduce bundle size
57- disableLogger : true ,
43+ reactComponentAnnotation : { enabled : true } , // 세션 리플레이와 브레드크럼에서 상세한 컴포넌트명 표시
5844
59- // Enables automatic instrumentation of Vercel Cron Monitors. (Does not yet work with App Router route handlers.)
60- // See the following for more information:
61- // https://docs.sentry.io/product/crons/
62- // https://vercel.com/docs/cron-jobs
63- automaticVercelMonitors : true ,
45+ tunnelRoute : '/monitoring' , // ad-blocker 우회를 위한 경로 (저희가 이전에 왜 생기는지 이유를 추측했던 그 경로 맞습니다..)
6446} ) ;
0 commit comments