Skip to content

hotMod beta ​

Function of @v12-engine/engine

ts
export declare function hotMod(hot: HotContext | undefined, current: ModDef, next: unknown): void;

A mod's module's new version, taken while it runs (hot reload), as hotRules takes a game's: at its end,

if (import.meta.hot) import.meta.hot.accept((module) = hotMod(import.meta.hot, goldRush, module?.goldRush))

The mod given is made the new one in place, and every game of the page played with it is made again of its parts as they are now (recompose) and takes that. What does not go (no new module, another mod, mods that no longer go together) loads the page again