// Lazy fs — loaded via dynamic import() on first use. // This avoids require() which bundlers convert to createRequire(import.meta.url) // that crashes on CF Workers where import.meta.url is undefined. let _fs: typeof import("fs") | undefined; export async function lazyFs(): Promise { if (!_fs) { _fs = await import("node:fs"); } return _fs; }