mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-21 10:00:39 +00:00
fix: Bun compatibility for build scripts and runtime detection
This commit is contained in:
parent
73734a23a1
commit
6d0c544e18
5 changed files with 12 additions and 8 deletions
|
|
@ -3,8 +3,8 @@ let _existsSync: typeof import("node:fs").existsSync | null = null;
|
|||
let _homedir: typeof import("node:os").homedir | null = null;
|
||||
let _join: typeof import("node:path").join | null = null;
|
||||
|
||||
// Eagerly load in Node.js environment only
|
||||
if (typeof process !== "undefined" && process.versions?.node) {
|
||||
// Eagerly load in Node.js/Bun environment only
|
||||
if (typeof process !== "undefined" && (process.versions?.node || process.versions?.bun)) {
|
||||
import("node:fs").then((m) => {
|
||||
_existsSync = m.existsSync;
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue