diff --git a/scripts/mergeLessPlugin.js b/scripts/mergeLessPlugin.js index 2a7accdc..2e27f372 100755 --- a/scripts/mergeLessPlugin.js +++ b/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(() => {