Description
This just cost me almost a day to figure out. I was upgrading and refactoring a large (ReScript) React Native app, and suddenly Metro Bundler was not picking up any changes anymore until I restarted it with --reset-cache
. Which I had to repeat every time I made a change. 🤯
The reason was that, in the process of refactoring, I had introduced some "unused open" warnings that I was planning to resolve later.
For the files with warnings, correct JS output was generated in the .bs.js, but the timestamp of the .bs.js was set to / remained 1970-01-01, so Metro did not refresh its cache and therefore the changes I made never became active in my app.
I think this is quite a serious issue and might affect other bundlers, too. I believe I have just not run into it before because I usually don't leave any warnings unresolved.