diff --git a/src/webpack/patchWebpack.ts b/src/webpack/patchWebpack.ts index 8ba7d33aa..951fad46f 100644 --- a/src/webpack/patchWebpack.ts +++ b/src/webpack/patchWebpack.ts @@ -382,7 +382,6 @@ function patchFactory(id: PropertyKey, factory: AnyModuleFactory) { for (let i = 0; i < patches.length; i++) { const patch = patches[i]; - if (patch.predicate && !patch.predicate()) continue; const moduleMatches = typeof patch.find === "string" ? code.includes(patch.find) @@ -398,8 +397,6 @@ function patchFactory(id: PropertyKey, factory: AnyModuleFactory) { // We change all patch.replacement to array in plugins/index for (const replacement of patch.replacement as PatchReplacement[]) { - if (replacement.predicate && !replacement.predicate()) continue; - const lastCode = code; const lastFactory = factory;