From c960b4f1e321418b91458b8e4fc0f12c2cc3a4a4 Mon Sep 17 00:00:00 2001 From: Stefan Probst Date: Wed, 1 Dec 2021 18:42:59 +0100 Subject: [PATCH] fix: pass package type to loader runner --- lib/NormalModuleFactory.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/NormalModuleFactory.js b/lib/NormalModuleFactory.js index 4cb2cb65d5d..5b6eac7d4e5 100644 --- a/lib/NormalModuleFactory.js +++ b/lib/NormalModuleFactory.js @@ -991,7 +991,7 @@ If changing the source code is not an option there is also a resolve options cal context, item.loader, resolveContext, - (err, result) => { + (err, result, resolveRequest) => { if ( err && /^[^/]*$/.test(item.loader) && @@ -1020,6 +1020,7 @@ If changing the source code is not an option there is also a resolve options cal const parsedResult = identToLoaderRequest(result); const resolved = { loader: parsedResult.loader, + type: resolveRequest.descriptionFileData.type, options: item.options === undefined ? parsedResult.options