Checkout this sample repository: https://github.com/huntwj/rescript-cra-auto-reload-issue
First bad commit: 099b04b
Initial context: converting the base CRA template from JS -> ReScript.
The initial “Pseudo-port” of the .js files to .res files works fine, and the auto-reload continues to work fine. Once I extract an external module, however, it breaks.
%%raw(`import logo from './logo.svg';`)
This breaks auto-reload (though works with manual reload):
@module('./logo.svg') external logo: string = "default"
Note that the client still seems to detect “a change” and you see a network request on save, but the page itself does not change until you do a full reload on the page.
Any ideas and/or thoughts on how to proceed?
Thank you in advance,
P.S. For additional context, I’m following along with the following blog post: