Only watch entrypoints of local extensions for changes (#11113)

Ref #11095
This commit is contained in:
Nicola Krumschmidt
2022-01-17 19:24:16 +01:00
committed by GitHub
parent d95fc2327c
commit 5ba34720e6

View File

@@ -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], {