Skip to content

Commit d7c2c9a

Browse files
authored
fix: don't print when plugins that disabled by app is empty (#201)
1 parent 18f3805 commit d7c2c9a

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

lib/loader/mixin/plugin.js

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -312,11 +312,13 @@ module.exports = {
312312
this.options.logger.info(`Following plugins will be enabled implicitly.\n${message}`);
313313

314314
// should warn when the plugin is disabled by app
315-
message = implicitEnabledPlugins
316-
.filter(name => appPlugins[name] && appPlugins[name].enable === false)
317-
.map(name => ` - ${name} required by [${requireMap[name]}]`)
318-
.join('\n');
319-
this.options.logger.warn(`Following plugins will be enabled implicitly that is disabled by application.\n${message}`);
315+
const disabledPlugins = implicitEnabledPlugins.filter(name => appPlugins[name] && appPlugins[name].enable === false);
316+
if (disabledPlugins.length) {
317+
message = disabledPlugins
318+
.map(name => ` - ${name} required by [${requireMap[name]}]`)
319+
.join('\n');
320+
this.options.logger.warn(`Following plugins will be enabled implicitly that is disabled by application.\n${message}`);
321+
}
320322
}
321323

322324
return result.sequence.map(name => allPlugins[name]);

0 commit comments

Comments
 (0)