UNPKG

@farmfe/runtime-plugin-hmr

Version:

Runtime hmr plugin of Farm

15 lines 478 B
import { HmrClient } from './hmr-client.js'; import { createHotContext } from './hot-module-state.js'; let hmrClient; export default { name: 'farm-runtime-hmr-client-plugin', bootstrap(moduleSystem) { hmrClient = new HmrClient(moduleSystem); hmrClient.connect(); }, moduleCreated(module) { // create a hot context for each module module.meta.hot = createHotContext(module.id, hmrClient); } }; //# sourceMappingURL=index.js.map