Fable
Fable copied to clipboard
`Fable` removes all `.js` files from `.fable_modules` when a file in project is added/removed
Description
During fable watch
, any file adding/removing causes the clearing of all .js
files within fable_modules
resulting whole application failing. Only rerun helps.
Repro code
- Running
fable watch ./src/{my-project} --outDir ./src/{my-project}/.fable-build
- Adding/Removing a file in a project
The video shows the problem:
https://github.com/fable-compiler/Fable/assets/12534253/cdfbd0d3-36ec-4a32-9c91-216432eebd41
Related information
- Fable version:
4.6.0
- Operating system:
Mac OS 14 Sonoma
Indeed, it looks like when Fable detect a change to the fsproj
it cleans the fable_modules
, then restore the fsproj/csproj
and rebuild the fable_modules
however without compiling the Fable dependencies back.
IHMO Fable, should not clean the fable_modules
as a whole and instead remove only the dependencies that changed (removed, version changed, added) and keep the others in place.