From 904b53c3687afc6ff2f1c12a533251568cc4ad2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E5=98=89=E6=B6=B5?= Date: Tue, 24 Dec 2019 08:16:17 +0800 Subject: [PATCH] =?UTF-8?q?fix(cli):=20skip=20demo=E3=80=81test=20dir=20in?= =?UTF-8?q?=20build=20watch=20mode?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/vant-cli/src/commands/build.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/vant-cli/src/commands/build.ts b/packages/vant-cli/src/commands/build.ts index 45046f3b1..a308d469b 100644 --- a/packages/vant-cli/src/commands/build.ts +++ b/packages/vant-cli/src/commands/build.ts @@ -176,6 +176,10 @@ function watchFileChange() { logger.watch('Compiled successfully, watching file changes...'); chokidar.watch(SRC_DIR).on('change', async path => { + if (isDemoDir(path) || isTestDir(path)) { + return; + } + const logger = getInteractiveLogger(); const esPath = path.replace(SRC_DIR, ES_DIR); const libPath = path.replace(SRC_DIR, LIB_DIR);