@@ -17,23 +17,25 @@ 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
- // Upload files from `<distDir>/static/chunks` rather than `<distDir>/static/chunks/pages`. Usually files outside of
26
- // `pages/` only contain third-party code, but in cases where they contain user code, restricting the webpack
27
- // plugin's upload breaks sourcemaps for those user-code-containing files, because it keeps them from being
28
- // 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
29
- // up uploading too many files, which is why this defaults to `false`.
30
- widenClientFileUpload ?: boolean ;
31
- } ;
20
+ sentry ?: UserSentryOptions ;
32
21
} & {
33
22
// other `next.config.js` options
34
23
[ key : string ] : unknown ;
35
24
} ;
36
25
26
+ export type UserSentryOptions = {
27
+ disableServerWebpackPlugin ?: boolean ;
28
+ disableClientWebpackPlugin ?: boolean ;
29
+ hideSourceMaps ?: boolean ;
30
+
31
+ // Upload files from `<distDir>/static/chunks` rather than `<distDir>/static/chunks/pages`. Usually files outside of
32
+ // `pages/` only contain third-party code, but in cases where they contain user code, restricting the webpack
33
+ // plugin's upload breaks sourcemaps for those user-code-containing files, because it keeps them from being
34
+ // 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
35
+ // up uploading too many files, which is why this defaults to `false`.
36
+ widenClientFileUpload ?: boolean ;
37
+ } ;
38
+
37
39
export type NextConfigFunction = (
38
40
phase : string ,
39
41
defaults : { defaultConfig : NextConfigObject } ,
0 commit comments