What does the code look like?
module Inner = {
let loader = async () => Console.log("inner")
}
let loader = async () => Console.log("toplevel")
e.g. this compiles to
async function loader() {
console.log("inner");
}
let Inner = {
loader: loader
};
async function loader$1() {
console.log("toplevel");
}
export {
Inner,
loader$1 as loader,
}
maybe you can restructure your code so that the compiler emits it without aliases. In the example above for instance by moving the Inner loader to a separate file.