对于components,还需要监控pages目录下的修改

This commit is contained in:
Pan Qiancheng 2024-10-23 15:04:46 +08:00
parent 625b34d5bf
commit 76fc081cbf
1 changed files with 13 additions and 1 deletions

View File

@ -207,13 +207,25 @@ export function createFileWatcher(context: vscode.ExtensionContext) {
}
const componentPath = pathConfig.componentsHome;
disposeComponentWatcher = watchDirectory(
const pagesHome = pathConfig.pagesHome;
const cpns = watchDirectory(
componentPath,
context,
handleComponentChange,
handleComponentChange,
handleComponentChange
);
const pages = watchDirectory(
pagesHome,
context,
handleComponentChange,
handleComponentChange,
handleComponentChange
);
disposeComponentWatcher = () => {
cpns();
pages();
}
});
// 监控entities目录只在新增或者删除的时候更新ProjectEntityList