Error handling bugfix in dev server

This commit is contained in:
2026-07-20 20:41:30 +01:00
parent 1d0ac4aa80
commit e3a0f5fbeb
16 changed files with 582 additions and 431 deletions
+13 -3
View File
@@ -22,12 +22,22 @@ export default async function serverPostBuildFn(params) {
continue;
}
if (params?.reload_all_controllers) {
controller.controller.enqueue(reload_enqueue);
try {
controller.controller.enqueue(reload_enqueue);
}
catch {
global.HMR_CONTROLLERS.splice(i, 1);
}
continue;
}
const target_artifact = global.BUNDLER_CTX_MAP[controller.target_map.local_path];
if (!target_artifact.local_path) {
controller.controller.enqueue(reload_enqueue);
if (!target_artifact?.local_path) {
try {
controller.controller.enqueue(reload_enqueue);
}
catch {
global.HMR_CONTROLLERS.splice(i, 1);
}
continue;
}
const mock_req = target_artifact.req_url