aboutsummaryrefslogtreecommitdiff
path: root/src/webpack/patchWebpack.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/webpack/patchWebpack.ts')
-rw-r--r--src/webpack/patchWebpack.ts10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/webpack/patchWebpack.ts b/src/webpack/patchWebpack.ts
index 19ca951..697ce94 100644
--- a/src/webpack/patchWebpack.ts
+++ b/src/webpack/patchWebpack.ts
@@ -92,9 +92,11 @@ function patchPush() {
return;
}
+ const numberId = Number(id);
+
for (const callback of listeners) {
try {
- callback(exports);
+ callback(exports, numberId);
} catch (err) {
logger.error("Error in webpack listener", err);
}
@@ -104,17 +106,17 @@ function patchPush() {
try {
if (filter(exports)) {
subscriptions.delete(filter);
- callback(exports);
+ callback(exports, numberId);
} else if (typeof exports === "object") {
if (exports.default && filter(exports.default)) {
subscriptions.delete(filter);
- callback(exports.default);
+ callback(exports.default, numberId);
}
for (const nested in exports) if (nested.length <= 3) {
if (exports[nested] && filter(exports[nested])) {
subscriptions.delete(filter);
- callback(exports[nested]);
+ callback(exports[nested], numberId);
}
}
}