diff --git a/packages/@vuepress/shared-utils/lib/module.js b/packages/@vuepress/shared-utils/lib/module.js index 5cce825f06..3177e8002d 100644 --- a/packages/@vuepress/shared-utils/lib/module.js +++ b/packages/@vuepress/shared-utils/lib/module.js @@ -50,7 +50,8 @@ exports.resolveModule = function (request, context) { return resolvedPath } resolvedPath = resolve(request, { - paths: [context || process.cwd()] + // module.paths is for globally install packages. + paths: [context || process.cwd(), ...module.paths] }) return resolvedPath }