|
|
@@ -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")
|
|
|
})
|