13 lines
371 B
TypeScript
13 lines
371 B
TypeScript
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'));
|
|
});
|
|
}
|