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
+8 -2
View File
@@ -23,9 +23,15 @@ export default function ssrCTXArtifactTracker({ entryToPage, post_build_fn, }) {
build.onEnd(async (result) => {
if (result.errors.length > 0) {
global.SSR_BUNDLER_CTX_DISPOSED = true;
await global.SSR_BUNDLER_CTX?.dispose();
try {
await global.SSR_BUNDLER_CTX?.dispose();
}
catch { }
global.SSR_BUNDLER_CTX = undefined;
build_starts = 0;
console.log("SSR Build errors:", result.errors);
for (const err of result.errors) {
console.error(`SSR Build error: ${err.text}${err.location ? ` (${err.location.file}:${err.location.line}:${err.location.column})` : ""}`);
}
return;
}
const artifacts = grabArtifactsFromBundledResults({