docs(viewer): document npm registry bootstrap (#521)

This commit is contained in:
Aymeric Rabot
2026-07-19 18:43:50 +02:00
committed by GitHub
parent 59a67e68ca
commit 1d43a39f9a
5 changed files with 106 additions and 21 deletions
@@ -418,6 +418,14 @@ const Viewer = forwardRef<ViewerHandle, ViewerProps>(function Viewer(
},
ref,
) {
useEffect(() => {
if (nodeRegistry.size === 0) {
console.warn(
'[viewer] Node registry is empty. Install @pascal-app/nodes and call await loadPlugin(builtinPlugin) before mounting <Viewer>.',
)
}
}, [])
useImperativeHandle(
ref,
() => ({