export {
loader$1 as loader,
make,
$$default as default,
}
This is the final output generated by Rescript.
When I changed the js file to export const loader = XXX, export default XXX
It started up normally when running in dev mode using the React Router CLI.
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.