fp/services/our/src/utils/nanoSpawn.ts
CJ_Clippy 110565d536
Some checks failed
ci / build (push) Failing after 0s
ci / Tests & Checks (push) Failing after 1s
add funscripts tests
2025-07-18 03:50:29 -08:00

12 lines
374 B
TypeScript

// utils/nanoSpawn.ts
// we do this because we need to use dynamic import() when using ESM only module via tsup CJS interop.
let nanoSpawnPromise: Promise<typeof import('nano-spawn').default> | null = null;
export async function getNanoSpawn() {
if (!nanoSpawnPromise) {
nanoSpawnPromise = import('nano-spawn').then(m => m.default);
}
return nanoSpawnPromise;
}