diff --git a/packages/hub-ui/package.json b/packages/hub-ui/package.json index 0124839f..051234d3 100644 --- a/packages/hub-ui/package.json +++ b/packages/hub-ui/package.json @@ -45,6 +45,11 @@ "@devframes/json-render": "workspace:*", "devframe": "workspace:*" }, + "peerDependenciesMeta": { + "@devframes/json-render": { + "optional": true + } + }, "devDependencies": { "@antfu/design": "catalog:frontend", "@devframes/hub": "workspace:*", diff --git a/packages/hub-ui/src/client/types.ts b/packages/hub-ui/src/client/types.ts index f30e46eb..07cf8961 100644 --- a/packages/hub-ui/src/client/types.ts +++ b/packages/hub-ui/src/client/types.ts @@ -1,7 +1,12 @@ import type { DevframeViewLauncher } from '@devframes/hub/types' // Importing the hub-mounted json-render integration registers its // `'json-render'` dock entry (a serializable `view` ref, not a live handle) -// on the hub's open dock union via declaration merging. +// on the hub's open dock union via declaration merging. This has to be a +// value import, not `import type`, because TS rejects a type-only +// side-effect import (no bindings to mark as type-only) — but it's still +// fully erased at build time since nothing in dist ever references it, so +// @devframes/json-render staying an *optional* peer below doesn't change +// what ships. import '@devframes/json-render/hub' /**