Skip to content

Commit

Permalink
fix($core): globally installed vuepress cannot resolve '@vuepress/def…
Browse files Browse the repository at this point in the history
…ault'

close: #985
  • Loading branch information
ulivz committed Nov 9, 2018
1 parent e9e6f5a commit 256b7c4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/@vuepress/shared-utils/lib/module.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

1 comment on commit 256b7c4

@jrappen
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed #949 thanks @ulivz

Please sign in to comment.