Skip to content

Commit 9a1205d

Browse files
committed
revert changes. fails on CI
1 parent 635546e commit 9a1205d

1 file changed

Lines changed: 13 additions & 8 deletions

File tree

packages/kbn-optimizer/src/optimizer/optimizer_config.ts

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919

2020
import Path from 'path';
2121
import Os from 'os';
22-
import { getPluginSearchPaths } from '@kbn/dev-utils';
2322

2423
import {
2524
Bundle,
@@ -160,13 +159,19 @@ export class OptimizerConfig {
160159
throw new TypeError('outputRoot must be an absolute path');
161160
}
162161

163-
const pluginScanDirs =
164-
options.pluginScanDirs ||
165-
getPluginSearchPaths({
166-
rootDir: repoRoot,
167-
oss,
168-
examples,
169-
});
162+
/**
163+
* BEWARE: this needs to stay roughly synchronized with
164+
* `src/core/server/config/env.ts` which determines which paths
165+
* should be searched for plugins to load
166+
*/
167+
const pluginScanDirs = options.pluginScanDirs || [
168+
Path.resolve(repoRoot, 'src/plugins'),
169+
...(oss ? [] : [Path.resolve(repoRoot, 'x-pack/plugins')]),
170+
Path.resolve(repoRoot, 'plugins'),
171+
...(examples ? [Path.resolve('examples')] : []),
172+
...(examples && !oss ? [Path.resolve('x-pack/examples')] : []),
173+
Path.resolve(repoRoot, '../kibana-extra'),
174+
];
170175

171176
if (!pluginScanDirs.every((p) => Path.isAbsolute(p))) {
172177
throw new TypeError('pluginScanDirs must all be absolute paths');

0 commit comments

Comments
 (0)