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 8267561 commit e281d54Copy full SHA for e281d54
packages/nextjs/src/config/webpack.ts
@@ -276,7 +276,8 @@ export function constructWebpackConfigFunction({
276
});
277
278
// Wrap middleware
279
- if (userSentryOptions.autoInstrumentMiddleware ?? true) {
+ const canWrapStandaloneMiddleware = userNextConfig.output !== 'standalone' || (major && major < 16);
280
+ if ((userSentryOptions.autoInstrumentMiddleware ?? true) && canWrapStandaloneMiddleware) {
281
newConfig.module.rules.unshift({
282
test: isMiddlewareResource,
283
use: [
0 commit comments