Fable Node.js Bundled App
This is a simple Fable Node.js app which is bundled with webpack. It's basically what we need to start working on Serverless functions for instance.
- dotnet SDK 2.1 or higher
- node.js with npm
- An F# editor like Visual Studio, Visual Studio Code with Ionide or JetBrains Rider.
Building and running the app
- Install JS dependencies:
- Build Node.js app
npm run-script build
- Try Node.js app
JS dependencies are declared in
package-lock.json is a lock file automatically generated.
Webpack is a JS bundler with extensions, like a static dev server that enables hot reloading on code changes. Fable interacts with Webpack through the
fable-loader. Configuration for Webpack is defined in the
The sample only contains two F# files: the project (.fsproj) and a source file (.fs) in the