Skip to content

Commit 256b7c4

Browse files
committed
fix($core): globally installed vuepress cannot resolve '@vuepress/default'
close: #985
1 parent e9e6f5a commit 256b7c4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/@vuepress/shared-utils/lib/module.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,8 @@ exports.resolveModule = function (request, context) {
5050
return resolvedPath
5151
}
5252
resolvedPath = resolve(request, {
53-
paths: [context || process.cwd()]
53+
// module.paths is for globally install packages.
54+
paths: [context || process.cwd(), ...module.paths]
5455
})
5556
return resolvedPath
5657
}

0 commit comments

Comments
 (0)