That’ll depend somewhat on firebase. One possibility would be to try a default export, since that’s what cjs modules are interpreted as in esm. In other words, replace
type module_ = {
mutable exports: Js.Dict.t<Firebase.apiCallback>
}
external module_: module_ = "module"
module_.exports = Js.Dict.fromArray([
(ApiDefinition.myAction, ApiImpl.myAction),
(ApiDefinition.myOtherAction, ApiImpl.myOtherAction),
])
with
let default = Js.Dict.fromArray([
(ApiDefinition.myAction, ApiImpl.myAction),
(ApiDefinition.myOtherAction, ApiImpl.myOtherAction),
])
and see if firebase can still interpret what you’re doing.