Error handling bugfix: pass #1

This commit is contained in:
2026-10-02 07:04:22 +01:00
parent 39a5e91eeb
commit d8ea4f8e02
53 changed files with 1179 additions and 410 deletions
+16 -2
View File
@@ -11,6 +11,9 @@ import ssrCTXArtifactTracker from "./plugins/ssr-ctx-artifact-tracker";
import { writeFileSync } from "fs";
import path from "path";
import { log } from "../../utils/log";
import {
logBuildErrorsOnce,
} from "../../utils/build-error-log";
const { BUNX_CWD_MODULE_CACHE_DIR, BUNX_TMP_DIR } = grabDirNames();
@@ -114,9 +117,20 @@ export default async function pagesSSRBundler(params?: Params) {
...(config.ssr_compiler_excludes || []),
],
splitting: true,
logLevel: "silent",
});
} catch (error) {
} catch (error: any) {
global.BUNEXT_SSR_BUNDLER_CTX_DISPOSED = true;
log.error(`SSR Bundler Error: ${error}`);
global.BUNEXT_BUILD_FAILED = true;
logBuildErrorsOnce(
[
{
text: `SSR Bundler Error: ${
error?.message || String(error)
}`,
},
],
(line) => log.error(line),
);
}
}