mirror of
https://github.com/n8n-io/n8n.git
synced 2025-01-11 12:57:29 -08:00
fix(core): Fix hot-reload that broke after chokidar upgrade (no-changelog) (#11658)
This commit is contained in:
parent
9b6123dfb2
commit
fb06b55211
|
@ -390,7 +390,15 @@ export class LoadNodesAndCredentials {
|
||||||
const toWatch = loader.isLazyLoaded
|
const toWatch = loader.isLazyLoaded
|
||||||
? ['**/nodes.json', '**/credentials.json']
|
? ['**/nodes.json', '**/credentials.json']
|
||||||
: ['**/*.js', '**/*.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);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue