From 6adae2044929c85d54ddff30f6d20ca77585ed5e Mon Sep 17 00:00:00 2001 From: Nuckyz <61953774+Nuckyz@users.noreply.github.com> Date: Mon, 17 Feb 2025 00:13:13 -0300 Subject: [PATCH] Priority blacklist module over returning if null export --- src/webpack/patchWebpack.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/webpack/patchWebpack.ts b/src/webpack/patchWebpack.ts index a185f142..568ce3eb 100644 --- a/src/webpack/patchWebpack.ts +++ b/src/webpack/patchWebpack.ts @@ -417,9 +417,6 @@ function runFactoryWithWrap(patchedFactory: PatchedModuleFactory, thisArg: unkno } exports = module.exports; - if (exports == null) { - return factoryReturn; - } if (typeof require === "function" && require.c) { if (_blacklistBadModules(require.c, exports, module.id)) { @@ -427,6 +424,10 @@ function runFactoryWithWrap(patchedFactory: PatchedModuleFactory, thisArg: unkno } } + if (exports == null) { + return factoryReturn; + } + for (const callback of moduleListeners) { try { callback(exports, module.id);