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

I export JavaScript files generated by ReScript in the format:

export {
  loader$1 as loader,
  make,
  $$default as default,
}

However, Hot Module Replacement in React Router v7 requires:

https://reactrouter.com/explanation/hot-module-replacement

export const headers = { "Cache-Control": "max-age=3600" }; // ✅
export const loader = async () => {}; // ✅
export const action = async () => {}; // ✅

What solution can address this issue?


Viewing all articles
Browse latest Browse all 2592

Trending Articles