diff --git a/src/webpack/patchWebpack.ts b/src/webpack/patchWebpack.ts index 4f0557817..a37169258 100644 --- a/src/webpack/patchWebpack.ts +++ b/src/webpack/patchWebpack.ts @@ -18,7 +18,7 @@ type PatchedModuleFactory = ModuleFactory & { }; type PatchedModuleFactories = Record & { - [Symbol.toStringTag]?: "ModuleFactories"; + [Symbol.toStringTag]?: string; }; const logger = new Logger("WebpackInterceptor", "#8caaee"); diff --git a/src/webpack/webpack.ts b/src/webpack/webpack.ts index 3003c6bd8..ab9ded1e0 100644 --- a/src/webpack/webpack.ts +++ b/src/webpack/webpack.ts @@ -77,6 +77,9 @@ export const factoryListeners = new Set<(factory: ModuleFactory) => void>(); export function _initWebpack(webpackRequire: WebpackRequire) { wreq = webpackRequire; cache = webpackRequire.c; + + // @ts-ignore + webpackRequire.c[Symbol.toStringTag] = "ModuleCache"; } let devToolsOpen = false;