Quantcast
Channel: ReScript Forum - Latest posts
Viewing all articles
Browse latest Browse all 2592

How to Resolve Export Format Conflicts Between ReScript and React Router v7 for Hot Module Replacement?

$
0
0

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.


Viewing all articles
Browse latest Browse all 2592

Trending Articles