We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ff63c45 commit 8b982d2Copy full SHA for 8b982d2
packages/nextjs/src/config/webpack.ts
@@ -944,5 +944,8 @@ function setupTreeshakingFromConfig(
944
defines.__SENTRY_EXCLUDE_REPLAY_WORKER__ = true;
945
}
946
947
- newConfig.plugins.push(new buildContext.webpack.DefinePlugin(defines));
+ // Only add DefinePlugin if there are actual defines to set
948
+ if (Object.keys(defines).length > 0) {
949
+ newConfig.plugins.push(new buildContext.webpack.DefinePlugin(defines));
950
+ }
951
0 commit comments