Skip to content

wirestate-core/hot ​

Development-only hot-reload entrypoint for Wirestate: the runtime the @wirestate/dev bundler plugin and framework providers use to swap containers in place when service modules are hot-replaced.

Remarks ​

Nothing here runs in production builds: the bundler plugin only injects calls during development, and framework integrations gate their registration on NODE_ENV. A transformed module opens itself with openHotModule, lets @Injectable() collect its classes while the body evaluates, and closes with closeHotModule.

Hot ​

NameDescription
HotSwapOwnerA framework provider that owns a managed container and can rebuild it during a hot swap.
closeHotModuleMarks the end of a hot module's evaluation and registers the classes it declared.
isHotSwappingReturns whether a hot swap is executing right now.
openHotModuleMarks the start of a hot module's evaluation.
registerHotModuleRegisters injectable classes from an evaluated hot module.
registerHotSwapOwnerRegisters a provider as the hot-swap owner of its managed container.
requestHotSwapRequests a hot swap for every container whose classes went stale.