You can redirect fable to output to a specific folder e.g. fable watch -o output --run webpack-dev-server (note the use of -o here).
This redirects all outputs into a single folder - all compiled JS files, as well as the .fable folder. At least one of our customers has suggested that they prefer using that rather than putting the JS outputs directly into the source folder as .fs.js files.
I've tested this out locally and the change would be trivial:
- Change the build project as e.g. above in the "run" Target:
"client", dotnet "fable watch -o output --run webpack-dev-server" clientPath
- Update the entry points in webpack e.g.
fsharpEntry: './src/Client/output/App.js',
(Note the lack of .fs in the file extension and the extra output in the path).
@alfonsogarciacaro is there any reason you would recommend one way or the other with this? What are the pros and cons of both?
You can redirect fable to output to a specific folder e.g.
fable watch -o output --run webpack-dev-server(note the use of-ohere).This redirects all outputs into a single folder - all compiled JS files, as well as the
.fablefolder. At least one of our customers has suggested that they prefer using that rather than putting the JS outputs directly into the source folder as.fs.jsfiles.I've tested this out locally and the change would be trivial:
(Note the lack of
.fsin the file extension and the extraoutputin the path).@alfonsogarciacaro is there any reason you would recommend one way or the other with this? What are the pros and cons of both?