From 58c25beeb62039d0702dee3ed033c204debd18ca Mon Sep 17 00:00:00 2001 From: Pierre Vanduynslager Date: Tue, 9 Oct 2018 16:08:17 -0400 Subject: [PATCH] fix: fix logs for plugins loaded with `plugins` option --- lib/plugins/index.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/plugins/index.js b/lib/plugins/index.js index a9b4aa14..1b713b19 100644 --- a/lib/plugins/index.js +++ b/lib/plugins/index.js @@ -19,7 +19,11 @@ module.exports = (context, pluginsPath) => { if (isPlainObject(plugin)) { Object.entries(plugin).forEach(([type, func]) => { if (PLUGINS_DEFINITIONS[type]) { - Reflect.defineProperty(func, 'pluginName', {value: 'Inline plugin', writable: false, enumerable: true}); + Reflect.defineProperty(func, 'pluginName', { + value: isPlainObject(name) ? 'Inline plugin' : name, + writable: false, + enumerable: true, + }); plugins[type] = [...(PLUGINS_DEFINITIONS[type].multiple ? plugins[type] || [] : []), [func, config]]; } });