Skip to content

Commit

Permalink
fix: external plugin kibana.json should restart dev server
Browse files Browse the repository at this point in the history
`plugins/myPlugin/kibana.json` should restart the dev server when changed. e.g. adding a required plugin
  • Loading branch information
mickalpine committed Nov 4, 2024
1 parent a4c3707 commit 4ccd0ec
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/kbn-cli-dev-mode/src/watcher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ const packageMatcher = makeMatcher([
/**
* Any code that is outside of a package must match this in order to trigger a restart
*/
const nonPackageMatcher = makeMatcher(['config/**/*.yml', "plugins/**/server/**/*"]);
const nonPackageMatcher = makeMatcher(['config/**/*.yml', 'plugins/**/server/**/*']);
const staticFileMatcher = makeMatcher(['plugins/**/kibana.json']);

export interface Options {
enabled: boolean;
Expand Down Expand Up @@ -87,6 +88,10 @@ export class Watcher {
if (result.type === 'non-package') {
return nonPackageMatcher(result.repoRel) && fire(result.repoRel);
}

if (result.type === 'static') {
return staticFileMatcher(result.repoRel) && fire(result.repoRel);
}
}
},
{
Expand Down

0 comments on commit 4ccd0ec

Please sign in to comment.