fix(bindings): fix root detection on windows

This commit is contained in:
Amaan Qureshi 2025-09-28 07:28:27 -04:00 committed by Amaan Qureshi
parent 122493b717
commit 24c8feba3e

View file

@ -1,4 +1,6 @@
const root = new URL("../..", import.meta.url).pathname;
import { fileURLToPath } from "node:url";
const root = fileURLToPath(new URL("../..", import.meta.url));
const binding = typeof process.versions.bun === "string"
// Support `bun build --compile` by being statically analyzable enough to find the .node file at build-time