Skip to content

Send fable output to a specific folder? #459

@isaacabraham

Description

@isaacabraham

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:

  1. Change the build project as e.g. above in the "run" Target:
"client", dotnet "fable watch -o output --run webpack-dev-server" clientPath
  1. 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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions