Skip to content

Commit

Permalink
fix(theme): correct local theme detect logic on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
PeachScript committed Sep 11, 2020
1 parent 5e09253 commit af2c142
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/preset-dumi/src/theme/loader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ function detectTheme() {
export default async () => {
if (!cache || process.env.NODE_ENV === 'test') {
const [name = process.env.DUMI_THEME || FALLBACK_THEME] = detectTheme();
const theme = name.startsWith('/') ? name : `${name}/src`;
const theme = path.isAbsolute(name) ? name : `${name}/src`;
const modulePath = winPath(path.resolve(ctx.umi.paths.absNodeModulesPath, theme));
const builtinPath = path.join(modulePath, 'builtins');
const components = fs.existsSync(builtinPath)
Expand Down

0 comments on commit af2c142

Please sign in to comment.