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
+8 -1
View File
@@ -10,6 +10,7 @@ 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();
export default async function pagesSSRBundler(params) {
const pages = grabAllPages({
@@ -85,10 +86,16 @@ export default async function pagesSSRBundler(params) {
...(config.ssr_compiler_excludes || []),
],
splitting: true,
logLevel: "silent",
});
}
catch (error) {
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));
}
}