Skip to content

Commit

Permalink
Avoid resolving the mvnpm Imports twice
Browse files Browse the repository at this point in the history
  • Loading branch information
gsmet committed Jul 13, 2024
1 parent 6999d11 commit 4694e5a
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -340,8 +341,8 @@ QuteTemplateBuildItem createIndexHtmlTemplate(
aggregator.addMappings(importMap);
}

Map<String, String> currentImportMap = aggregator.aggregate(nonApplicationRootPathBuildItem.getNonApplicationRootPath())
.getImports();
Imports imports = aggregator.aggregate(nonApplicationRootPathBuildItem.getNonApplicationRootPath());
Map<String, String> currentImportMap = imports.getImports();
Map<String, String> relocationMap = relocationImportMapBuildItem.getRelocationMap();
for (Map.Entry<String, String> relocation : relocationMap.entrySet()) {
String from = relocation.getKey();
Expand All @@ -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();
Expand Down

0 comments on commit 4694e5a

Please sign in to comment.