升级umi4.0,修复新建脚本

This commit is contained in:
whyour
2022-09-18 20:40:59 +08:00
parent 518e8903a3
commit 1e55f4065d
28 changed files with 227 additions and 126 deletions
+5 -2
View File
@@ -115,8 +115,11 @@ export default (app: Router) => {
if (!originFilename) {
originFilename = filename;
}
const originFilePath = `${path}${originFilename.replace(/\//g, '')}`;
const filePath = `${path}${filename.replace(/\//g, '')}`;
const originFilePath = join(
path,
`${originFilename.replace(/\//g, '')}`,
);
const filePath = join(path, `${filename.replace(/\//g, '')}`);
if (fs.existsSync(originFilePath)) {
fs.copyFileSync(
originFilePath,