fix: parse parallelization chunk arg, inline b64 for og image

This commit is contained in:
Jacky Zhao
2025-03-16 15:12:40 -07:00
parent a737207981
commit e86544064c
4 changed files with 49 additions and 35 deletions

View File

@ -172,7 +172,7 @@ export async function parseMarkdown(ctx: BuildCtx, fps: FilePath[]): Promise<Pro
workerType: "thread",
})
const errorHandler = (err: any) => {
console.error(`${err}`.replace(/^error:\s*/i, ""))
console.error(err)
process.exit(1)
}
@ -201,7 +201,7 @@ export async function parseMarkdown(ctx: BuildCtx, fps: FilePath[]): Promise<Pro
const markdownToHtmlPromises: WorkerPromise<ProcessedContent[]>[] = []
processedFiles = 0
for (const [mdChunk, _] of mdResults) {
for (const mdChunk of mdResults) {
markdownToHtmlPromises.push(pool.exec("processHtml", [serializableCtx, mdChunk]))
}
const results: ProcessedContent[][] = await Promise.all(