HORROR
This commit is contained in:
parent
1e96638219
commit
7b7b87316d
|
@ -19,7 +19,7 @@ const initCallbackRegex = canonicalizeMatch(/{return \i\(".+?"\)}/);
|
||||||
|
|
||||||
const allProxiedModules = new Set<WebpackRequire["m"]>();
|
const allProxiedModules = new Set<WebpackRequire["m"]>();
|
||||||
|
|
||||||
const modulesProxyhandler: ProxyHandler<WebpackRequire["m"]> = {
|
const modulesProxyHandler: ProxyHandler<WebpackRequire["m"]> = {
|
||||||
...Object.fromEntries(Object.getOwnPropertyNames(Reflect).map(propName =>
|
...Object.fromEntries(Object.getOwnPropertyNames(Reflect).map(propName =>
|
||||||
[propName, (...args: any[]) => Reflect[propName](...args)]
|
[propName, (...args: any[]) => Reflect[propName](...args)]
|
||||||
)),
|
)),
|
||||||
|
@ -176,7 +176,7 @@ Object.defineProperty(Function.prototype, "m", {
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
originalModules.$$proxiedModules = proxiedModules;
|
originalModules.$$proxiedModules = proxiedModules;
|
||||||
allProxiedModules.add(proxiedModules);
|
allProxiedModules.add(proxiedModules);
|
||||||
Object.setPrototypeOf(originalModules, new Proxy(proxiedModules, modulesProxyhandler));
|
Object.setPrototypeOf(originalModules, new Proxy(proxiedModules, modulesProxyHandler));
|
||||||
}
|
}
|
||||||
|
|
||||||
Object.defineProperty(this, "m", {
|
Object.defineProperty(this, "m", {
|
||||||
|
|
Loading…
Reference in a new issue