diff --git a/packages/nextjs/src/config/withSentryConfig.ts b/packages/nextjs/src/config/withSentryConfig.ts index 2b8d12792470..f2668a2ad87e 100644 --- a/packages/nextjs/src/config/withSentryConfig.ts +++ b/packages/nextjs/src/config/withSentryConfig.ts @@ -17,7 +17,7 @@ import type { export function withSentryConfig( exportedUserNextConfig: ExportedNextConfig = {}, userSentryWebpackPluginOptions: Partial = {}, -): NextConfigFunction | NextConfigObject { +): NextConfigFunction { return function (phase: string, defaults: { defaultConfig: NextConfigObject }): NextConfigObject { if (typeof exportedUserNextConfig === 'function') { const userNextConfigObject = exportedUserNextConfig(phase, defaults);