Skip to content

Commit e84741b

Browse files
committed
allow users to force-enable plugin
1 parent fc84c0d commit e84741b

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

packages/nextjs/src/config/webpack.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -470,8 +470,10 @@ function shouldEnableWebpackPlugin(buildContext: BuildContext, userSentryOptions
470470

471471
/** User override */
472472

473-
if ((isServer && disableServerWebpackPlugin) || (!isServer && disableClientWebpackPlugin)) {
474-
return false;
473+
if (isServer && disableServerWebpackPlugin !== undefined) {
474+
return !disableServerWebpackPlugin;
475+
} else if (!isServer && disableClientWebpackPlugin !== undefined) {
476+
return !disableClientWebpackPlugin;
475477
}
476478

477479
/** Situations where the default is to disable the plugin */

0 commit comments

Comments
 (0)