diff --git a/lib/prepare.js b/lib/prepare.js
index <HASH>..<HASH> 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)) {
fix: fix vuepress cant resolve custom theme under .vuepress/theme (#3)