File tree 1 file changed +1
-11
lines changed
packages/@vuepress/core/lib/node
1 file changed +1
-11
lines changed Original file line number Diff line number Diff line change @@ -56,17 +56,7 @@ module.exports = function loadTheme (ctx) {
56
56
function normalizeThemePath ( resolved ) {
57
57
const { entry, name, fromDep } = resolved
58
58
if ( fromDep ) {
59
- const packageRoot = require . resolve ( `${ name } /package.json` )
60
- const { main } = require ( packageRoot )
61
- if ( main . endsWith ( '.vue' ) ) {
62
- // For those cases that "main" field is set to an non-index file
63
- // e.g. `layouts/Layout.vue`
64
- return packageRoot
65
- } else {
66
- // For those cases that "index.js" is not at package root
67
- // e.g. `lib/index.js` (#1362)
68
- return parse ( require . resolve ( name ) ) . dir
69
- }
59
+ return parse ( require . resolve ( name ) ) . dir
70
60
} else if ( entry . endsWith ( '.js' ) || entry . endsWith ( '.vue' ) ) {
71
61
return parse ( entry ) . dir
72
62
} else {
You can’t perform that action at this time.
0 commit comments