Skip to content

Commit

Permalink
fix: conventional loading not working bug
Browse files Browse the repository at this point in the history
  • Loading branch information
PeachScript committed Dec 27, 2022
1 parent 31dfc87 commit 84c5136
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/features/derivative.ts
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,15 @@ export default (api: IApi) => {
USELESS_TMP_FILES.forEach((file) => {
fsExtra.rmSync(path.join(api.paths.absTmpPath, file), { force: true });
});

// replace @/loading from umi.ts, because dumi use `<rootDir>/.dumi` as absSrcPath
const umiPath = path.join(api.paths.absTmpPath, 'umi.ts');
fsExtra.writeFileSync(
umiPath,
fsExtra
.readFileSync(umiPath, 'utf-8')
.replace("'@/loading'", "'../loading'"),
);
},
});

Expand Down

0 comments on commit 84c5136

Please sign in to comment.