diff --git a/scripts/mergeLessPlugin.js b/scripts/mergeLessPlugin.js index 2a7accdc7fd4f0f2231ddb1fdd3b97f754d340a6..2e27f372b7f3f8a9b809fb1d1f9c6aa8d8417c5f 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(() => {