How ReactLoom stays isolated

ConcernApproach
ReactPeer dependency — share it as a singleton.
CSS collisionsHashed class names (pl-button-root-x7Ab2), everything inside @layer, no element selectors.
Two library versionsCompatible versions coexist: class names differ, token names are semver-stable.
ThemesDOM-scoped. A remote inside the host’s provider inherits its theme without sharing JavaScript.
OverlaysModal dialogs use the browser top layer: no z-index contest, no portal container.
Scroll lockCoordinated through attributes on <html>, so overlays from different copies cooperate.
Global stateNone — no singletons, registries or window globals.

Module Federation

vite.config.ts (host)
federation({
  name: 'host',
  remotes: {
    billing: { type: 'module', name: 'billing', entry: 'https://billing.example.com/remoteEntry.js' },
  },
  shared: {
    react: { singleton: true, requiredVersion: '^19.0.0' },
    'react-dom': { singleton: true, requiredVersion: '^19.0.0' },
    // @reactloom/ui is not shared: each remote ships the version it was tested with.
  },
})

Load @reactloom/theme/theme.css once in the host; each remote imports its own @reactloom/ui/styles.css.

What is tested

The host and billing remote build with the current workspace UI. The support remote builds with a packed snapshot from the first working UI commit. Browser tests check that the builds coexist with a single React instance, keep their own CSS, inherit the host theme, and isolate remote failures.