fix: resolve compiled binary crashes from circular dep and Bun CJS splitting bug
Deploy to apn-relay / porter-deploy (push) Has been cancelled

This commit is contained in:
LukeParkerDev
2026-04-20 16:19:44 +10:00
parent ce209e22a2
commit 2b3d027e3b
3 changed files with 8 additions and 3 deletions
+3 -1
View File
@@ -13,7 +13,8 @@ import { Installation } from "../../installation"
import { PushRelay } from "../../server/push-relay"
import { Log } from "../../util"
import { Global } from "../../global"
import * as QRCode from "qrcode"
// dynamic import: static `import * as` of CJS package triggers Bun bundler splitting bug
import type * as QRCodeType from "qrcode"
const log = Log.create({ service: "serve" })
@@ -184,6 +185,7 @@ async function printPairQR(pair: PairPayload) {
linkLength: link.length,
qr: qrConfig,
})
const QRCode: typeof QRCodeType = await import("qrcode")
const code = await QRCode.toString(link, {
...qrConfig,
})