Skip to content

Commit

Permalink
feat($core): allow a theme package using a sub directory (close #1204) (
Browse files Browse the repository at this point in the history
  • Loading branch information
meteorlxy authored and ulivz committed Jan 20, 2019
1 parent 199f18e commit febe3a7
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 febe3a7

Please sign in to comment.