SAFE-Stack / SAFE-template

dotnet CLI template for SAFE project
MIT License
280 stars 87 forks source link

Fix HMR #608

Closed jwthomson closed 1 month ago

jwthomson commented 1 month ago

Why was HMR broken?

Example sequence of events:

  1. Change made to e.g. Index.fs
  2. Fable and Vite notice a change to the file...
    • Vite doesn't know how to hot reload a .fs file, so it does a full refresh, just in case.
    • Fable does a recompile
  3. Vite sees the new .js files from Fable recompile and does a HMR

Fix

Instruct Vite not to watch .fs files.