[7.x] add src/plugins to the list of plugin dirs to watch (#45… (#45273)

* add src/plugins to the list of plugin dirs to watch

* include x-pack/plugins too
This commit is contained in:
Spencer 2019-09-10 13:34:02 -07:00 committed by GitHub
parent 65631a26b9
commit eb1046ff8d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -24,6 +24,7 @@ import opn from 'opn';
import { debounce, invoke, bindAll, once, uniq } from 'lodash';
import * as Rx from 'rxjs';
import { first, mapTo, filter, map, take } from 'rxjs/operators';
import { REPO_ROOT } from '@kbn/dev-utils';
import Log from '../log';
import Worker from './worker';
@ -102,8 +103,15 @@ export default class ClusterManager {
if (opts.watch) {
const pluginPaths = config.get('plugins.paths');
const scanDirs = config.get('plugins.scanDirs');
const extraPaths = [...pluginPaths, ...scanDirs];
const scanDirs = [
...config.get('plugins.scanDirs'),
resolve(REPO_ROOT, 'src/plugins'),
resolve(REPO_ROOT, 'x-pack/plugins'),
];
const extraPaths = [
...pluginPaths,
...scanDirs,
];
const extraIgnores = scanDirs
.map(scanDir => resolve(scanDir, '*'))