fix: 修复桌面字体转换依赖启动崩溃

This commit is contained in:
SkyJourney
2026-08-01 11:12:30 +08:00
parent 3081c02887
commit f9f5fccfc9
2 changed files with 21 additions and 1 deletions
+4 -1
View File
@@ -12,7 +12,10 @@ await build({
banner: {
js: [
'import { createRequire as __mdToPdfCreateRequire } from "node:module";',
"const require = __mdToPdfCreateRequire(import.meta.url);"
'import { dirname as __mdToPdfDirname } from "node:path";',
'import { fileURLToPath as __mdToPdfFileURLToPath } from "node:url";',
"const require = __mdToPdfCreateRequire(import.meta.url);",
"const __dirname = __mdToPdfDirname(__mdToPdfFileURLToPath(import.meta.url));"
].join("\n")
}
});