Skip to content

Commit 709ecce

Browse files
committed
inject sentry.x.config.js into pages/_error
1 parent c1341fd commit 709ecce

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/nextjs/src/config/webpack.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ function checkWebpackPluginOverrides(
254254
* @returns `true` if sentry code should be injected, and `false` otherwise
255255
*/
256256
function shouldAddSentryToEntryPoint(entryPointName: string): boolean {
257-
return entryPointName === 'pages/_app' || entryPointName.includes('pages/api');
257+
return entryPointName === 'pages/_app' || entryPointName === 'pages/_error' || entryPointName.includes('pages/api');
258258
}
259259

260260
/**

0 commit comments

Comments
 (0)