fix(cli): skip demo、test dir in build watch mode

This commit is contained in:
陈嘉涵 2019-12-24 08:16:17 +08:00
parent eafcc128a2
commit 904b53c368

View File

@ -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);