Merge branch 'modules-proxy-patches' into immediate-finds-modules-proxy
This commit is contained in:
commit
ef895e787a
|
@ -17,9 +17,7 @@ type PatchedModuleFactory = ModuleFactory & {
|
||||||
$$vencordOriginal?: ModuleFactory;
|
$$vencordOriginal?: ModuleFactory;
|
||||||
};
|
};
|
||||||
|
|
||||||
type PatchedModuleFactories = Record<PropertyKey, PatchedModuleFactory> & {
|
type PatchedModuleFactories = Record<PropertyKey, PatchedModuleFactory>;
|
||||||
[Symbol.toStringTag]?: string;
|
|
||||||
};
|
|
||||||
|
|
||||||
const logger = new Logger("WebpackInterceptor", "#8caaee");
|
const logger = new Logger("WebpackInterceptor", "#8caaee");
|
||||||
|
|
||||||
|
@ -140,7 +138,11 @@ Object.defineProperty(Function.prototype, "m", {
|
||||||
|
|
||||||
allModuleFactories.add(moduleFactories);
|
allModuleFactories.add(moduleFactories);
|
||||||
|
|
||||||
moduleFactories[Symbol.toStringTag] = "ModuleFactories";
|
Object.defineProperty(moduleFactories, Symbol.toStringTag, {
|
||||||
|
value: "ModuleFactories",
|
||||||
|
configurable: true,
|
||||||
|
writable: true
|
||||||
|
});
|
||||||
moduleFactories = new Proxy(moduleFactories, moduleFactoriesHandler);
|
moduleFactories = new Proxy(moduleFactories, moduleFactoriesHandler);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -88,8 +88,11 @@ export function _initWebpack(webpackRequire: WebpackRequire) {
|
||||||
wreq = webpackRequire;
|
wreq = webpackRequire;
|
||||||
cache = webpackRequire.c;
|
cache = webpackRequire.c;
|
||||||
|
|
||||||
// @ts-ignore
|
Object.defineProperty(webpackRequire.c, Symbol.toStringTag, {
|
||||||
webpackRequire.c[Symbol.toStringTag] = "ModuleCache";
|
value: "ModuleCache",
|
||||||
|
configurable: true,
|
||||||
|
writable: true
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
let devToolsOpen = false;
|
let devToolsOpen = false;
|
||||||
|
|
Loading…
Reference in a new issue