Build reusable React component hosting and typed fragment composition

This commit is contained in:
Timothy J. Aveni
2026-09-22 16:46:33 -07:00
parent a8869e4545
commit b8571d054b
4 changed files with 65 additions and 4 deletions
+7
View File
@@ -2799,6 +2799,13 @@ const compileCapabilityResourceSourceInternal = (
revision: lowerPackage(state, context, options.source),
};
if (resource.revision.modules?.length) {
resource.revision.clientPackages = Object.fromEntries(
imports.flatMap((entry) => {
if (entry.kind !== "package") return [];
const imported = options.environment?.packages?.get(entry.binding);
return imported ? [[entry.binding, imported.revisionId]] : [];
}),
);
resource.revision.clientInterfaces = Object.fromEntries(
imports.flatMap((entry) => {
if (entry.kind !== "interface") return [];