From c6dc1b8525d66ffd22b9a02dcfbc6b20e1f6c0c6 Mon Sep 17 00:00:00 2001 From: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Date: Wed, 20 Dec 2023 10:55:58 -0500 Subject: [PATCH] [8.12] fix(NA): skip plugin-helpers assets optimization when no ui (#173703) (#173753) # Backport This will backport the following commits from `main` to `8.12`: - [fix(NA): skip plugin-helpers assets optimization when no ui (#173703)](https://github.com/elastic/kibana/pull/173703) ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) Co-authored-by: Tiago Costa --- .../kbn-plugin-helpers/src/tasks/brotli_compress_bundles.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/kbn-plugin-helpers/src/tasks/brotli_compress_bundles.ts b/packages/kbn-plugin-helpers/src/tasks/brotli_compress_bundles.ts index f04d707b279e9..ef03cb86c7aa0 100644 --- a/packages/kbn-plugin-helpers/src/tasks/brotli_compress_bundles.ts +++ b/packages/kbn-plugin-helpers/src/tasks/brotli_compress_bundles.ts @@ -20,7 +20,11 @@ import { TaskContext } from '../task_context'; const asyncPipeline = promisify(pipeline); -export async function brotliCompressBundles({ buildDir, log }: TaskContext) { +export async function brotliCompressBundles({ buildDir, log, plugin }: TaskContext) { + if (!plugin.manifest.ui) { + return; + } + const compressDir = Path.resolve(buildDir, 'target/public'); log.info(