diff --git a/src/webpack/patchWebpack.ts b/src/webpack/patchWebpack.ts index f891e38d..311e6f2b 100644 --- a/src/webpack/patchWebpack.ts +++ b/src/webpack/patchWebpack.ts @@ -99,6 +99,16 @@ Object.defineProperty(Function.prototype, "O", { }; onChunksLoaded.toString = originalOnChunksLoaded.toString.bind(originalOnChunksLoaded); + + // Returns whether a chunk has been loaded + Object.defineProperty(onChunksLoaded, "j", { + set(v) { + delete onChunksLoaded.j; + onChunksLoaded.j = v; + originalOnChunksLoaded.j = v; + }, + configurable: true + }); } Object.defineProperty(this, "O", {