fix: windows 问题

This commit is contained in:
winixt 2022-04-18 10:21:38 +08:00
parent a535345e0a
commit 5724cbd8f3

View File

@ -40,6 +40,8 @@ function getPkgPath(pkgName) {
}
function genShortPath(filePath) {
// 处理 windows 的路径
filePath = filePath.replace(/\\/g, '/');
const codePath = filePath.split(`/${SOURCE_DIR}/`)[1];
return `${SOURCE_DIR}/${codePath}`;
}