From 4694e5abc8f4d9713329ac658e94468012787d76 Mon Sep 17 00:00:00 2001 From: Guillaume Smet Date: Sat, 13 Jul 2024 15:52:03 +0200 Subject: [PATCH] Avoid resolving the mvnpm Imports twice --- .../devui/deployment/BuildTimeContentProcessor.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/extensions/vertx-http/deployment/src/main/java/io/quarkus/devui/deployment/BuildTimeContentProcessor.java b/extensions/vertx-http/deployment/src/main/java/io/quarkus/devui/deployment/BuildTimeContentProcessor.java index 26177f8ec97a8..cd17d2ce3a4fc 100644 --- a/extensions/vertx-http/deployment/src/main/java/io/quarkus/devui/deployment/BuildTimeContentProcessor.java +++ b/extensions/vertx-http/deployment/src/main/java/io/quarkus/devui/deployment/BuildTimeContentProcessor.java @@ -45,6 +45,7 @@ import io.mvnpm.importmap.Aggregator; import io.mvnpm.importmap.Location; +import io.mvnpm.importmap.model.Imports; import io.quarkus.bootstrap.model.ApplicationModel; import io.quarkus.builder.Version; import io.quarkus.deployment.IsDevelopment; @@ -340,8 +341,8 @@ QuteTemplateBuildItem createIndexHtmlTemplate( aggregator.addMappings(importMap); } - Map currentImportMap = aggregator.aggregate(nonApplicationRootPathBuildItem.getNonApplicationRootPath()) - .getImports(); + Imports imports = aggregator.aggregate(nonApplicationRootPathBuildItem.getNonApplicationRootPath()); + Map currentImportMap = imports.getImports(); Map relocationMap = relocationImportMapBuildItem.getRelocationMap(); for (Map.Entry relocation : relocationMap.entrySet()) { String from = relocation.getKey(); @@ -356,7 +357,7 @@ QuteTemplateBuildItem createIndexHtmlTemplate( } String esModuleShimsVersion = extractEsModuleShimsVersion(mvnpmBuildItem.getMvnpmJars()); - String importmap = aggregator.aggregateAsJson(nonApplicationRootPathBuildItem.getNonApplicationRootPath()); + String importmap = aggregator.aggregateAsJson(imports); aggregator.reset(); String themeVars = themeVarsBuildItem.getTemplateValue();