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