UNPKG

zarbis

Version:

Configuration-less build tool

29 lines 1.06 kB
if (module.hot) { function checkForUpdate(_fromUpdate) { if (module.hot.status() === "idle") { module.hot.check(true).then((updatedModules) => { if (!updatedModules) return; console.log('[HMR] Updated modules: ' + updatedModules.join(', ')); setTimeout(checkForUpdate, 0, 0); }).catch((err) => { if (["abort", "fail"].includes(module.hot.status())) { console.error('[HMR] Restart needed: ' + (err.message)); } else { console.error('[HMR] Apply error: ' + (err.message)); setTimeout(checkForUpdate, 0, 0); } }); } } const updateInterval = setInterval(checkForUpdate, 1000); if (typeof updateInterval === 'object' && updateInterval.unref) { updateInterval.unref(); } } else { console.error('[HMR] module.hot is not defined, wtf?'); } export {}; //# sourceMappingURL=hmrApplier.js.map