Skip to content

Commit

Permalink
fix(core): Fix hot-reload that broke after chokidar upgrade (no-chang…
Browse files Browse the repository at this point in the history
…elog) (#11658)
  • Loading branch information
netroy authored Nov 8, 2024
1 parent 9b6123d commit fb06b55
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion packages/cli/src/load-nodes-and-credentials.ts
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,15 @@ export class LoadNodesAndCredentials {
const toWatch = loader.isLazyLoaded
? ['**/nodes.json', '**/credentials.json']
: ['**/*.js', '**/*.json'];
watch(toWatch, { cwd: realModulePath }).on('change', reloader);
const files = await glob(toWatch, {
cwd: realModulePath,
ignore: ['node_modules/**'],
});
const watcher = watch(files, {
cwd: realModulePath,
ignoreInitial: true,
});
watcher.on('add', reloader).on('change', reloader).on('unlink', reloader);
});
}
}

0 comments on commit fb06b55

Please sign in to comment.