diff --git a/src/dev/build/lib/config.ts b/src/dev/build/lib/config.ts index a33540ce00c5f..a27592e3f6427 100644 --- a/src/dev/build/lib/config.ts +++ b/src/dev/build/lib/config.ts @@ -251,6 +251,6 @@ export class Config { } getDistPluginsFromRepo() { - return getPackages(this.repoRoot).filter(this.pluginFilter); + return getPackages(this.repoRoot).filter((p) => !p.isDevOnly() && this.pluginFilter(p)); } } diff --git a/src/dev/build/tasks/package_json/create_package_json_tasks.ts b/src/dev/build/tasks/package_json/create_package_json_tasks.ts index d5f4ee94e049b..fae14c14e3db5 100644 --- a/src/dev/build/tasks/package_json/create_package_json_tasks.ts +++ b/src/dev/build/tasks/package_json/create_package_json_tasks.ts @@ -6,6 +6,7 @@ * Side Public License, v 1. */ +import { PluginPackage } from '@kbn/repo-packages'; import { findUsedDependencies } from './find_used_dependencies'; import { read, write, Task } from '../../lib'; @@ -13,7 +14,7 @@ export const CreatePackageJson: Task = { description: 'Creating build-ready version of package.json', async run(config, log, build) { - const plugins = config.getDistPluginsFromRepo(); + const plugins = config.getDistPluginsFromRepo() as PluginPackage[]; const distPkgIds = new Set(config.getDistPackagesFromRepo().map((p) => p.id)); const pkg = config.getKibanaPkg();