Skip to content

Commit

Permalink
chore($core): resolve theme path to the dir of main file (close vuejs…
Browse files Browse the repository at this point in the history
  • Loading branch information
meteorlxy committed Jan 19, 2019
1 parent 9fb5c5f commit ec575b9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/@vuepress/core/lib/prepare/loadTheme.js
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ module.exports = async function loadTheme (ctx) {
function normalizeThemePath (resolved) {
const { entry, name, fromDep } = resolved
if (fromDep) {
const pkgPath = require.resolve(`${name}/package.json`)
const pkgPath = require.resolve(name)
return path.parse(pkgPath).dir
} else if (entry.endsWith('.js') || entry.endsWith('.vue')) {
return path.parse(entry).dir
Expand Down

0 comments on commit ec575b9

Please sign in to comment.