Catch errors while rerunning modules

This commit is contained in:
zodern
2021-01-11 21:03:40 -06:00
parent db4ab14031
commit 266ea5bbd9

View File

@@ -430,9 +430,13 @@ function applyChangeset({
reloadId += 1;
toRerun.forEach(moduleId => {
rerunFile(moduleId);
});
try {
toRerun.forEach(moduleId => {
rerunFile(moduleId);
});
} catch (error) {
console.error('HMR: Error while applying changes:', error);
}
console.log('HMR: finished updating');
return true;