@@ -5,13 +5,16 @@ const nextConfig = {
5
5
reactStrictMode : true ,
6
6
experimental : { forceSwcTransforms : true } ,
7
7
output : 'standalone' ,
8
- hideSourceMaps : true ,
9
- productionBrowserSourceMaps : false ,
8
+ productionBrowserSourceMaps : true ,
10
9
webpack : ( config , options ) => {
11
10
config . module . rules . push ( {
12
11
test : / \. s v g $ / i,
13
12
use : [ options . defaultLoaders . babel , { loader : '@svgr/webpack' , options : { babel : false } } ] ,
14
13
} ) ;
14
+ if ( ! options . dev ) {
15
+ config . devtool =
16
+ process . env . NODE_ENV === 'production' ? 'hidden-source-map' : 'inline-source-map' ;
17
+ }
15
18
16
19
return config ;
17
20
} ,
@@ -23,42 +26,21 @@ const nextConfig = {
23
26
] ,
24
27
} ,
25
28
} ;
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/
38
29
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' ,
46
35
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 , // 클라이언트 대상의 소스맵 파일 은닉
52
39
53
- // Hides source maps from generated client bundles
54
- hideSourceMaps : true ,
40
+ silent : ! process . env . CI , // CI 진행시에만 로그가 표시되도록 강제
41
+ disableLogger : true , // 번들 사이즈 감소를 위해 센트리 기본 로그 메세지 트리셰이크
55
42
56
- // Automatically tree-shake Sentry logger statements to reduce bundle size
57
- disableLogger : true ,
43
+ reactComponentAnnotation : { enabled : true } , // 세션 리플레이와 브레드크럼에서 상세한 컴포넌트명 표시
58
44
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 우회를 위한 경로 (저희가 이전에 왜 생기는지 이유를 추측했던 그 경로 맞습니다..)
64
46
} ) ;
0 commit comments