소스 검색

bugfix: Determine if temp exists

陈帅 7 년 전
부모
커밋
cb85fd1867
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      scripts/mergeLessPlugin.js

+ 1 - 1
scripts/mergeLessPlugin.js

@@ -59,7 +59,7 @@ class mergeLessPlugin {
       // covert less
       if (fs.existsSync(outFile)) {
         fs.unlinkSync(outFile);
-      } else {
+      } else if (!fs.existsSync(path.dirname(outFile))) {
         fs.mkdirSync(path.dirname(outFile));
       }
       loopAllLess(options.stylesDir).then(() => {