瀏覽代碼

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(() => {