HMR for blockly blocks

This commit is contained in:
azykov@mail.ru
2026-06-13 15:29:55 +03:00
parent 1ed3203ec5
commit a61b5f0105
36 changed files with 533 additions and 463 deletions
+12
View File
@@ -0,0 +1,12 @@
import * as barrel from './index';
import { registerBarrel } from './toolbox';
registerBarrel(barrel as Record<string, unknown>);
if (import.meta.hot) {
import.meta.hot.accept('./index', (newBarrel) => {
if (newBarrel)
registerBarrel(newBarrel as Record<string, unknown>);
window.dispatchEvent(new CustomEvent('blockly-hmr'));
});
}