Skip to content

hub-rsbuild-minimal

The minimal Rsbuild host for @devframes/hub: one initHub() call mounted into the dev server's middleware stack, the UI supplied by @devframes/hub-ui.

Package: hub-rsbuild-minimal · framework: Rsbuild

What it shows

  • initHub({ base, devframes: [inspect, messages], ui: createUi() }) created inside server.setup in rsbuild.config.ts — lazily, so importing the config never spawns the hub's side-car.
  • server.setup registers hub.nodeMiddleware, which owns the /__devframes/ namespace and hands everything else back to Rsbuild.
  • The RPC WebSocket runs on an eager side-car port, advertised through <base>__connection.json; html.tags injects the ${hub.base}embedded.js bootstrap.

Run it

sh
pnpm install
pnpm --filter hub-rsbuild-minimal dev

Open the printed URL for the host page with the floating dock, or /__devframes/ for the standalone viewer.

Source

examples/hub-rsbuild-minimal

Released under the MIT License.