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 bf868fb commit 547fccfCopy full SHA for 547fccf
packages/nextjs/src/config/webpack.ts
@@ -941,5 +941,8 @@ function setupTreeshakingFromConfig(
941
defines.__SENTRY_EXCLUDE_REPLAY_WORKER__ = true;
942
}
943
944
- newConfig.plugins.push(new buildContext.webpack.DefinePlugin(defines));
+ // Only add DefinePlugin if there are actual defines to set
945
+ if (Object.keys(defines).length > 0) {
946
+ newConfig.plugins.push(new buildContext.webpack.DefinePlugin(defines));
947
+ }
948
0 commit comments