diff --git a/src/optimize/watch/optmzr_role.js b/src/optimize/watch/optmzr_role.js index 9e25cb34f3ca88..6d5df5b6350869 100644 --- a/src/optimize/watch/optmzr_role.js +++ b/src/optimize/watch/optmzr_role.js @@ -21,8 +21,6 @@ import { resolve } from 'path'; import WatchServer from './watch_server'; import WatchOptimizer, { STATUS } from './watch_optimizer'; -// import { DllCompiler } from '../dynamic_dll_plugin'; -import { fromRoot } from '../../utils'; // TODO: remove when merge with master import { WatchCache } from './watch_cache'; export default async (kbnServer, kibanaHapiServer, config) => { @@ -38,7 +36,6 @@ export default async (kbnServer, kibanaHapiServer, config) => { watchCache: new WatchCache({ log, outputPath: config.get('path.data'), - dllsPath: fromRoot('./dlls'), // TODO: replace by DllCompiler.getRawDllConfig().outputPath when merge with master cachePath: resolve(kbnServer.uiBundles.getCacheDirectory(), '../'), }) }); diff --git a/src/optimize/watch/watch_cache.ts b/src/optimize/watch/watch_cache.ts index 4a65b730cc6778..1cde3498d416dc 100644 --- a/src/optimize/watch/watch_cache.ts +++ b/src/optimize/watch/watch_cache.ts @@ -25,16 +25,13 @@ import { promisify } from 'util'; import del from 'del'; import deleteEmpty from 'delete-empty'; import globby from 'globby'; -import mkdirp from 'mkdirp'; -const mkdirpAsync = promisify(mkdirp); const readAsync = promisify(readFile); const writeAsync = promisify(writeFile); interface Params { log: (tags: string[], data: string) => void; outputPath: string; - dllsPath: string; cachePath: string; } @@ -46,7 +43,6 @@ interface WatchCacheStateContent { export class WatchCache { private readonly log: Params['log']; private readonly outputPath: Params['outputPath']; - private readonly dllsPath: Params['dllsPath']; private readonly cachePath: Params['cachePath']; private readonly cacheState: WatchCacheStateContent; private statePath: string; @@ -56,7 +52,6 @@ export class WatchCache { constructor(params: Params) { this.log = params.log; this.outputPath = params.outputPath; - this.dllsPath = params.dllsPath; this.cachePath = params.cachePath; this.isInitialized = false; @@ -103,10 +98,6 @@ export class WatchCache { // from the previous cache path reset action await deleteEmpty(this.cachePath); - // delete dlls - await del(this.dllsPath); - await mkdirpAsync(this.dllsPath); - // re-write new cache state file await this.write(); @@ -135,14 +126,8 @@ export class WatchCache { private async buildOptimizerConfigSha() { const baseOptimizer = resolve(__dirname, '../base_optimizer.js'); - const dynamicDllConfigModel = resolve(__dirname, '../dynamic_dll_plugin/dll_config_model.js'); - const dynamicDllPlugin = resolve(__dirname, '../dynamic_dll_plugin/dynamic_dll_plugin.js'); - - return await this.buildShaWithMultipleFiles([ - baseOptimizer, - dynamicDllConfigModel, - dynamicDllPlugin, - ]); + + return await this.buildShaWithMultipleFiles([baseOptimizer]); } private isResetNeeded() {