mirror of
https://github.com/meteor/meteor.git
synced 2026-01-09 07:38:15 -05:00
refactor plugin filtering logic in meteorRspackHelpers
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user