diff --git a/src/webpack/patchWebpack.ts b/src/webpack/patchWebpack.ts index 075a5a624..723271f98 100644 --- a/src/webpack/patchWebpack.ts +++ b/src/webpack/patchWebpack.ts @@ -107,7 +107,7 @@ Object.defineProperty(Function.prototype, "m", { // setImmediate to clear this property setter if this is not the main Webpack // If this is the main Webpack, wreq.m will always be set before the timeout runs - const setterTimeout = setTimeout(() => delete (this as Partial).p, 0); + const setterTimeout = setTimeout(() => Reflect.deleteProperty(this, "p"), 0); Object.defineProperty(this, "p", { configurable: true,