refactor plugin filtering logic in meteorRspackHelpers

This commit is contained in:
Nacho Codoñer
2025-12-16 15:05:32 +01:00
parent db47a0a181
commit 81ede070e7

View File

@@ -194,11 +194,9 @@ function disablePlugins(config, matchers) {
);
});
plugins.forEach((p, index) => {
const matches = predicates.some((fn) => fn(p, index));
if (!matches) {
kept.push(p);
}
config.plugins = plugins.filter((p, index) => {
const matches = predicates.some(fn => fn(p, index));
return !matches;
});
config.plugins = kept;