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