fix: parcel watcher musl support

This commit is contained in:
Aiden Cline
2025-12-08 16:08:53 -06:00
parent 479cca29a5
commit 4dcda3d53d
5 changed files with 8 additions and 2 deletions

View File

@@ -9,6 +9,8 @@ import { createWrapper } from "@parcel/watcher/wrapper"
import { lazy } from "@/util/lazy"
import type ParcelWatcher from "@parcel/watcher"
declare const OPENCODE_LIBC: string | undefined
export namespace FileWatcher {
const log = Log.create({ service: "file.watcher" })
@@ -24,7 +26,7 @@ export namespace FileWatcher {
const watcher = lazy(() => {
const binding = require(
`@parcel/watcher-${process.platform}-${process.arch}${process.platform === "linux" ? "-glibc" : ""}`,
`@parcel/watcher-${process.platform}-${process.arch}${process.platform === "linux" ? `-${OPENCODE_LIBC || "glibc"}` : ""}`,
)
return createWrapper(binding) as typeof import("@parcel/watcher")
})