fix: 修复桌面字体转换依赖启动崩溃
This commit is contained in:
@@ -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")
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user