Skip to content

Commit

Permalink
refactor(transformer): correct cache key for windows os
Browse files Browse the repository at this point in the history
  • Loading branch information
PeachScript committed Sep 13, 2021
1 parent 6ff5263 commit cdd9635
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/preset-dumi/src/transformer/remark/slug.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import path from 'path';
import slash from 'slash2';
import slugger from 'github-slugger';
import visit from 'unist-util-visit';
import toString from 'hast-util-to-string';
Expand Down Expand Up @@ -46,7 +47,7 @@ function getSluggerIns(fileAbsPath: string, masterKey: string) {
* @param fileAbsPath file absolute path
*/
export function getFilePathKey(fileAbsPath: string) {
return path.relative(ctx.umi?.cwd || process.cwd(), fileAbsPath);
return slash(path.relative(ctx.umi?.cwd || process.cwd(), fileAbsPath));
}

/**
Expand Down

0 comments on commit cdd9635

Please sign in to comment.