16 lines
414 B
JavaScript
16 lines
414 B
JavaScript
import {createDispatcher} from '@truss/truss';
|
|
|
|
const dispatcher = createDispatcher();
|
|
dispatcher.lookupActions(require('./actions'));
|
|
dispatcher.lookupHooks(require('./hooks'));
|
|
dispatcher.connect();
|
|
|
|
if (module.hot) {
|
|
module.hot.accept('./actions', () => {
|
|
dispatcher.lookupActions(require('./actions'));
|
|
});
|
|
module.hot.accept('./hooks', () => {
|
|
dispatcher.lookupHooks(require('./hooks'));
|
|
});
|
|
}
|