Skip to content

Commit

Permalink
fix: 当使用APP_ROOT时,在github编辑此页的路径问题
Browse files Browse the repository at this point in the history
  • Loading branch information
MrSeaWave committed Aug 31, 2021
1 parent 57d4133 commit 81cf69d
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions packages/preset-dumi/src/transformer/remark/meta.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@ import { getModuleResolvePath } from '../../utils/moduleResolver';
export default function meta(): IDumiUnifiedTransformer {
return (ast, vFile) => {
if (this.data('fileAbsPath')) {
const filePath = slash(
path.relative(ctx.umi?.cwd || process.cwd(), this.data('fileAbsPath')),
);
const filePath = slash(path.relative(process.cwd(), this.data('fileAbsPath')));

// append file info
vFile.data.filePath = filePath;
Expand Down

0 comments on commit 81cf69d

Please sign in to comment.