Minor Changes
-
Support inline Island entries compiled into the current host or external Rslib bundle. Configure LynXML (#4481)
resources throughpluginIslands({ inline })and reference them by ID, without
importing XML as JavaScript or fetching a separate bundle. Preserve first-frame
rendering, background readiness and independent instance lifecycles. External
entries retain their exports and include the inline resources' styles. Registries
stay local to each bundled Island runtime so independent bundles can reuse names. -
Add a runtime for embedding UI across Lynx DSLs and a ReactLynx host adapter with native view props and automatic resource loading. Pass the bundle URL and logical entry name together as
entry={{ url, name }}. An already available resource renders with the host's first frame and starts background interactions on the same instance when ready. (#4448)Host adapters pass a native container handle to
mountIsland. The runtime callsrender(context, props)with the current page, itspageId, and that container. Producers can usecontext.pageIdto create nodes and append them directly tocontext.container.Host adapters can pass an
isActivecallback toinitializeIslandBackgroundto skip evaluating a background entry after unmount or replacement. The ReactLynx adapter uses this check and shares bundle downloads with other consumers.Expose cross-DSL host and producer guidance at
@lynx-js/islands/skill, with a LynXML authoring reference. -
Add optional
entry.mode: 'sync' | 'async'toIsland, with asynchronous loading as the default. Synchronous mode waits up to five seconds for a Native bundle so the renderer can participate in the host's first frame. Requests and their results remain shared across modes; a timeout or a host withoutwait()continues loading asynchronously. (#4480)Host adapters can pass the same mode to
requestIslandBundle(url, mode). Background entry initialization andonBackgroundReadyremain separate from bundle availability. -
Expose
pluginIslands()from@lynx-js/islands/rsbuildto support module-localregisterIsland(factory)in LynXML external bundle entries and define the boolean__ISLAND__build flag on both threads. The emitted factory follows the existingcreate()contract. (#4472)