Переглянути джерело

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