mirror of
https://github.com/directus/directus.git
synced 2026-01-30 11:47:56 -05:00
Only watch entrypoints of local extensions for changes (#11113)
Ref #11095
This commit is contained in:
committed by
GitHub
parent
d95fc2327c
commit
5ba34720e6
@@ -199,7 +199,12 @@ class ExtensionManager {
|
||||
logger.info('Watching extensions for changes...');
|
||||
|
||||
const localExtensionPaths = (env.SERVE_APP ? EXTENSION_TYPES : API_EXTENSION_TYPES).map((type) =>
|
||||
path.resolve(env.EXTENSIONS_PATH, pluralize(type))
|
||||
path.posix.join(
|
||||
path.relative('.', env.EXTENSIONS_PATH).split(path.sep).join(path.posix.sep),
|
||||
pluralize(type),
|
||||
'*',
|
||||
'index.js'
|
||||
)
|
||||
);
|
||||
|
||||
this.watcher = chokidar.watch([path.resolve('.', 'package.json'), ...localExtensionPaths], {
|
||||
|
||||
Reference in New Issue
Block a user