@@ -17,26 +17,29 @@ export type NextConfigObject = {
17
17
target : 'server' | 'experimental-serverless-trace' ;
18
18
// the output directory for the built app (defaults to ".next")
19
19
distDir : string ;
20
- sentry ?: {
21
- disableServerWebpackPlugin ?: boolean ;
22
- disableClientWebpackPlugin ?: boolean ;
23
- hideSourceMaps ?: boolean ;
24
-
25
- // Force webpack to apply the same transpilation rules to the SDK code as apply to user code. Helpful when targeting
26
- // older browsers which don't support ES6 (or ES6+ features like object spread).
27
- transpileClientSDK ?: boolean ;
28
- // Upload files from `<distDir>/static/chunks` rather than `<distDir>/static/chunks/pages`. Usually files outside of
29
- // `pages/` only contain third-party code, but in cases where they contain user code, restricting the webpack
30
- // plugin's upload breaks sourcemaps for those user-code-containing files, because it keeps them from being
31
- // uploaded. At the same time, we don't want to widen the scope if we don't have to, because we're guaranteed to end
32
- // up uploading too many files, which is why this defaults to `false`.
33
- widenClientFileUpload ?: boolean ;
34
- } ;
20
+ sentry ?: UserSentryOptions ;
35
21
} & {
36
22
// other `next.config.js` options
37
23
[ key : string ] : unknown ;
38
24
} ;
39
25
26
+ export type UserSentryOptions = {
27
+ disableServerWebpackPlugin ?: boolean ;
28
+ disableClientWebpackPlugin ?: boolean ;
29
+ hideSourceMaps ?: boolean ;
30
+
31
+ // Force webpack to apply the same transpilation rules to the SDK code as apply to user code. Helpful when targeting
32
+ // older browsers which don't support ES6 (or ES6+ features like object spread).
33
+ transpileClientSDK ?: boolean ;
34
+
35
+ // Upload files from `<distDir>/static/chunks` rather than `<distDir>/static/chunks/pages`. Usually files outside of
36
+ // `pages/` only contain third-party code, but in cases where they contain user code, restricting the webpack
37
+ // plugin's upload breaks sourcemaps for those user-code-containing files, because it keeps them from being
38
+ // uploaded. At the same time, we don't want to widen the scope if we don't have to, because we're guaranteed to end
39
+ // up uploading too many files, which is why this defaults to `false`.
40
+ widenClientFileUpload ?: boolean ;
41
+ } ;
42
+
40
43
export type NextConfigFunction = (
41
44
phase : string ,
42
45
defaults : { defaultConfig : NextConfigObject } ,
0 commit comments