diff --git a/packages/@vuepress/core/lib/plugin-api/util.js b/packages/@vuepress/core/lib/plugin-api/util.js index 949a8a004c..bf40a15c04 100644 --- a/packages/@vuepress/core/lib/plugin-api/util.js +++ b/packages/@vuepress/core/lib/plugin-api/util.js @@ -46,7 +46,10 @@ exports.flattenPlugin = function ( } // respect name in local plugin config - name = fromDep && name || config.name + if (!fromDep && config.name) { + name = config.name + } + return Object.assign({}, config, { name, shortcut: fromDep ? shortcut : null,