Error handling bugfix: pass #1
This commit is contained in:
+8
-1
@@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user