From b507faeaf86f48c45e3a7a999b7fa7c058b82d00 Mon Sep 17 00:00:00 2001 From: ULIVZ <472590061@qq.com> Date: Sun, 9 Sep 2018 00:22:22 +0800 Subject: [PATCH] feat: empty temp dir before launching app --- packages/@vuepress/core/lib/prepare/AppContext.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/@vuepress/core/lib/prepare/AppContext.js b/packages/@vuepress/core/lib/prepare/AppContext.js index 85652152d1..5afaaa1f54 100644 --- a/packages/@vuepress/core/lib/prepare/AppContext.js +++ b/packages/@vuepress/core/lib/prepare/AppContext.js @@ -219,6 +219,8 @@ function createTemp (tempPath) { if (!fs.existsSync(tempPath)) { fs.ensureDirSync(tempPath) + } else { + fs.emptyDirSync(tempPath) } logger.tip(`Temp directory: ${chalk.gray(tempPath)}`)