Skip to content

Commit febe3a7

Browse files
meteorlxyulivz
authored andcommitted
feat($core): allow a theme package using a sub directory (close #1204) (#1206)
1 parent 199f18e commit febe3a7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/@vuepress/core/lib/prepare/loadTheme.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ module.exports = async function loadTheme (ctx) {
176176
function normalizeThemePath (resolved) {
177177
const { entry, name, fromDep } = resolved
178178
if (fromDep) {
179-
const pkgPath = require.resolve(`${name}/package.json`)
179+
const pkgPath = require.resolve(name)
180180
return path.parse(pkgPath).dir
181181
} else if (entry.endsWith('.js') || entry.endsWith('.vue')) {
182182
return path.parse(entry).dir

0 commit comments

Comments
 (0)