From 27b7c806f684b353cbdbf588b1f3f6cfc0d537d4 Mon Sep 17 00:00:00 2001 From: Gal Schlezinger Date: Thu, 17 Feb 2022 17:03:01 +0200 Subject: [PATCH] runtimeModules are never in middleware layer, but maybe in middleware chunks > I would juest omit that and leave source maps on for them Co-authored-by: Tobias Koppers --- .../build/webpack/plugins/middleware-source-maps-plugin.ts | 3 --- 1 file changed, 3 deletions(-) diff --git a/packages/next/build/webpack/plugins/middleware-source-maps-plugin.ts b/packages/next/build/webpack/plugins/middleware-source-maps-plugin.ts index 4ed2a0ecccd1..13d9ef93eb7b 100644 --- a/packages/next/build/webpack/plugins/middleware-source-maps-plugin.ts +++ b/packages/next/build/webpack/plugins/middleware-source-maps-plugin.ts @@ -41,9 +41,6 @@ class MiddlewareSourceMapsPlugin { compilation.hooks.buildModule.tap(PLUGIN_NAME, (module) => { module.useSourceMap = module.layer === 'middleware' }) - compilation.hooks.runtimeModule.tap(PLUGIN_NAME, (module) => { - module.useSourceMap = module.layer === 'middleware' - }) }) } }