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 76426a9 commit 66aa19cCopy full SHA for 66aa19c
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