diff --git a/lib/prepare.js b/lib/prepare.js index a193a1c498..5daf1a0c62 100644 --- a/lib/prepare.js +++ b/lib/prepare.js @@ -114,7 +114,7 @@ async function resolveOptions (sourceDir) { // resolve custom theme const themeDir = siteConfig.theme ? path.resolve(__dirname, `../../vuepress-theme-${siteConfig.theme}`) - : path.resolve(sourceDir, 'theme') + : path.resolve(vuepressDir, 'theme') const themePath = path.resolve(themeDir, 'Layout.vue') if (fs.existsSync(themePath)) {