The JS implementation of `fs` module uses `require("fs")` directly, but MoonBit compiler supports not only cjs format, but also esm and iife. https://github.com/moonbitlang/x/blob/6edf9b14b53217165cb60953c037bb2e4eeec46b/fs/fs_js.mbt#L18 https://github.com/moonbitlang/x/blob/6edf9b14b53217165cb60953c037bb2e4eeec46b/fs/fs_js.mbt#L32
The JS implementation of
fsmodule usesrequire("fs")directly, but MoonBit compiler supports not only cjs format, but also esm and iife.x/fs/fs_js.mbt
Line 18 in 6edf9b1
x/fs/fs_js.mbt
Line 32 in 6edf9b1