From 1aaa6e3210e6a703467a751c37e13c9737430048 Mon Sep 17 00:00:00 2001 From: ULIVZ <472590061@qq.com> Date: Sun, 23 Jun 2019 05:19:36 +0800 Subject: [PATCH] fix($core): cannot resolve agreement file from parent theme --- packages/@vuepress/core/lib/node/App.js | 2 +- packages/@vuepress/core/lib/node/theme-api/index.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/@vuepress/core/lib/node/App.js b/packages/@vuepress/core/lib/node/App.js index 629763ba77..99df7fc280 100755 --- a/packages/@vuepress/core/lib/node/App.js +++ b/packages/@vuepress/core/lib/node/App.js @@ -385,7 +385,7 @@ module.exports = class App { return current } if (this.themeAPI.existsParentTheme) { - const parent = path.resolve(this.themeAPI.theme.path, filepath) + const parent = path.resolve(this.themeAPI.parentTheme.path, filepath) if (fs.existsSync(parent)) { return parent } diff --git a/packages/@vuepress/core/lib/node/theme-api/index.js b/packages/@vuepress/core/lib/node/theme-api/index.js index 2ea634e1ed..861ceeeac9 100644 --- a/packages/@vuepress/core/lib/node/theme-api/index.js +++ b/packages/@vuepress/core/lib/node/theme-api/index.js @@ -80,7 +80,7 @@ module.exports = class ThemeAPI { isInternal: true } logger.warn( - `[vuepress] Cannot resolve Layout.vue file in \n ${Layout.path},` + `[vuepress] Cannot resolve Layout.vue file in \n ${Layout.path}, ` + `fallback to default layout: ${fallbackLayoutPath}` ) }