make reporter use eagerPatches

This commit is contained in:
Nuckyz 2024-05-23 06:22:01 -03:00
parent ac61a0377f
commit cfb493c593
No known key found for this signature in database
GPG key ID: 440BF8296E1C4AD9

View file

@ -324,6 +324,9 @@ async function runtime(token: string) {
}); });
}); });
// Enable eagerPatches to make all patches apply regardless of the module being required
Vencord.Settings.eagerPatches = false;
let wreq: typeof Vencord.Webpack.wreq; let wreq: typeof Vencord.Webpack.wreq;
const { canonicalizeMatch, Logger } = Vencord.Util; const { canonicalizeMatch, Logger } = Vencord.Util;
@ -493,12 +496,6 @@ async function runtime(token: string) {
} }
})); }));
// Call the getter for all the values in the modules object
// So modules that were not required get patched by our proxy
for (const id in wreq.m) {
wreq.m[id];
}
console.log("[PUP_DEBUG]", "Finished loading all chunks!"); console.log("[PUP_DEBUG]", "Finished loading all chunks!");
for (const patch of Vencord.Plugins.patches) { for (const patch of Vencord.Plugins.patches) {