Fable is an F# to JavaScript compiler that leverages the F# compiler service and Babel to emit clean, readable JavaScript. It compiles F# source code directly (no .NET bytecode), includes a minimal runtime (~20KB min+gzip), and integrates with the JavaScript ecosystem (ES6 modules, npm, Webpack). Current stable version is 5.0.0 (released 2024-08). Release cadence: major versions (4.x, 5.x) have been stable for years; pre-release RCs and alphas are frequent (multiple per month). Differentiators: F# fidelity (most F# core library, quotations, type providers), multi-target (JS, TS, Python, Dart, Rust, Erlang/BEAM), and no runtime overhead.
npm install fable-compiler-netcoreNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows minimal F# project setup with Fable, including fsproj, Fable.Core reference, and CLI compilation.
Use pattern matching or Option module functions instead of null checks on options.
Install with 'npm install -g fable-compiler'; run with 'fable'.
Specify target language explicitly: 'dotnet fable --lang TypeScript'.
Upgrade to Fable 4.x or 5.x and use .NET SDK (net8.0+).
Use F# 8 and .NET 8 SDK for Fable 5.0+.
Update Python-specific code expecting .length property; use len() or .Length (which maps to len()).
Install fable-compiler: npm install -g fable-compiler
Install globally: npm install -g fable-compiler, or use npx: npx fable-compiler
Add <PackageReference Include="Fable.Core" Version="*" /> to .fsproj