feat: HMR refresh

This commit is contained in:
cha0s 2021-03-26 09:32:07 -05:00
parent 63ba2554b8
commit b525489b7e

View File

@ -82,6 +82,7 @@ export default (latus) => (neutrino) => {
];
paths.forEach((path) => {
source.push(` module.hot.accept('${path}', () => {`);
source.push(` global.latus.refresh('${path}', require('${path}'));`);
source.push(` global.latus.invoke('@latus/core/hmr', '${path}');`);
source.push(' });');
});