From d17aee383791c3a8e8206f9e5450d2221e501b13 Mon Sep 17 00:00:00 2001 From: Luca Forstner Date: Tue, 21 May 2024 11:13:42 +0000 Subject: [PATCH] fix(nextjs): Fix legacy configuration method detection for emitting warning --- packages/nextjs/src/config/webpack.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/nextjs/src/config/webpack.ts b/packages/nextjs/src/config/webpack.ts index 20c37699bcf1..5c06644f3b48 100644 --- a/packages/nextjs/src/config/webpack.ts +++ b/packages/nextjs/src/config/webpack.ts @@ -420,7 +420,7 @@ function warnAboutDeprecatedConfigFiles(projectDir: string, platform: 'server' | return ( instrumentationHookContent.includes('@sentry/') || - instrumentationHookContent.match(/sentry\.(server|edge)\.config\.(ts|js)/) + instrumentationHookContent.match(/sentry\.(server|edge)\.config(\.(ts|js))?/) ); } catch (e) { return false;