Working setup for HMR with vite and rescript-react

Since I struggled to make Fast Refresh work with vite and rescript-react, I decided to create a simple repo that showcases a working setup for this.

Don’t hesitate to take a look at it if HMR is broken for you at some point.


Btw. you should get a working fast refresh setup out of the box with create-rescript-app.

  • npm create rescript-app
  • Select vite template

I guess I should have used that from the beginning, it would have saved me quite some time ^^