@@ -22,15 +22,15 @@ export type NextConfigFunctionWithSentry = (
2222) => NextConfigObjectWithSentry ;
2323
2424export type NextConfigObject = {
25- // custom webpack options
25+ // Custom webpack options
2626 webpack ?: WebpackConfigFunction ;
27- // whether to build serverless functions for all pages, not just API routes
27+ // Whether to build serverless functions for all pages, not just API routes. Removed in nextjs 12+.
2828 target ?: 'server' | 'experimental-serverless-trace' ;
29- // the output directory for the built app (defaults to ".next")
29+ // The output directory for the built app (defaults to ".next")
3030 distDir ?: string ;
31- // the root at which the nextjs app will be served (defaults to "/")
31+ // The root at which the nextjs app will be served (defaults to "/")
3232 basePath ?: string ;
33- // config which will be available at runtime
33+ // Config which will be available at runtime
3434 publicRuntimeConfig ?: { [ key : string ] : unknown } ;
3535} ;
3636
@@ -39,6 +39,9 @@ export type UserSentryOptions = {
3939 // the plugin to be enabled, even in situations where it's not recommended.
4040 disableServerWebpackPlugin ?: boolean ;
4141 disableClientWebpackPlugin ?: boolean ;
42+
43+ // Use `hidden-source-map` for webpack `devtool` option, which strips the `sourceMappingURL` from the bottom of built
44+ // JS files
4245 hideSourceMaps ?: boolean ;
4346
4447 // Force webpack to apply the same transpilation rules to the SDK code as apply to user code. Helpful when targeting
@@ -64,9 +67,8 @@ export type NextConfigFunction = (phase: string, defaults: { defaultConfig: Next
6467 * Webpack config
6568 */
6669
67- // the format for providing custom webpack config in your nextjs options
70+ // The two possible formats for providing custom webpack config in `next.config.js`
6871export type WebpackConfigFunction = ( config : WebpackConfigObject , options : BuildContext ) => WebpackConfigObject ;
69-
7072export type WebpackConfigObject = {
7173 devtool ?: string ;
7274 plugins ?: Array < WebpackPluginInstance | SentryWebpackPlugin > ;
@@ -81,7 +83,7 @@ export type WebpackConfigObject = {
8183 rules : Array < WebpackModuleRule > ;
8284 } ;
8385} & {
84- // other webpack options
86+ // Other webpack options
8587 [ key : string ] : unknown ;
8688} ;
8789
0 commit comments