Preserve original modules prototype
This commit is contained in:
parent
37514e0720
commit
0146789514
|
@ -166,7 +166,7 @@ Object.defineProperty(Function.prototype, "m", {
|
||||||
logger.info("Found Webpack module factory", stack.match(/\/assets\/(.+?\.js)/)?.[1] ?? "");
|
logger.info("Found Webpack module factory", stack.match(/\/assets\/(.+?\.js)/)?.[1] ?? "");
|
||||||
|
|
||||||
// The new object which will contain the factories
|
// The new object which will contain the factories
|
||||||
const proxiedModules: WebpackRequire["m"] = {};
|
const proxiedModules: WebpackRequire["m"] = Object.create(Object.getPrototypeOf(originalModules));
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
proxiedModules[Symbol.toStringTag] = "ProxiedModules";
|
proxiedModules[Symbol.toStringTag] = "ProxiedModules";
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue