From 3910aeda5d920b98cf81d3267b46c524ea4eba7f Mon Sep 17 00:00:00 2001 From: PeachScript Date: Wed, 11 Nov 2020 21:29:27 +0800 Subject: [PATCH] refactor(theme): start resolve theme from preset package --- packages/preset-dumi/src/theme/loader.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/preset-dumi/src/theme/loader.ts b/packages/preset-dumi/src/theme/loader.ts index 273f4ff92e..8bfcfa92ba 100644 --- a/packages/preset-dumi/src/theme/loader.ts +++ b/packages/preset-dumi/src/theme/loader.ts @@ -89,7 +89,8 @@ function detectTheme() { */ function getThemeResolvePath(sourcePath: string) { return getModuleResolvePath({ - basePath: ctx.umi.cwd, + // start search theme from @umijs/preset-dumi package + basePath: __dirname, sourcePath, silent: true, // use empty alias to avoid dumi repo start failed