Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions packages/nextjs/src/config/webpack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -341,9 +341,11 @@ export function constructWebpackConfigFunction(
newConfig.entry = async () => addSentryToClientEntryProperty(origEntryProperty, buildContext);
}

// We don't want to do any webpack plugin stuff OR any source maps stuff in dev mode.
const isStaticExport = userNextConfig?.output === 'export';

// We don't want to do any webpack plugin stuff OR any source maps stuff in dev mode or for the server on static-only builds.
// Symbolication for dev-mode errors is done elsewhere.
if (!isDev) {
if (!(isDev || (isStaticExport && isServer))) {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const { sentryWebpackPlugin } = loadModule<{ sentryWebpackPlugin: any }>('@sentry/webpack-plugin', module) ?? {};

Expand Down
Loading