Fable 5.1 is the latest minor release of the open‑source F#‑to‑JavaScript compiler, launched on September 23, 2022. It adds .NET 7 support, improves incremental compilation speed by up to 30 %, and introduces a new plugin API for custom transformations.
Fable is a compiler that translates F# code into highly optimized JavaScript, enabling developers to write front‑end applications with the full power of the .NET language ecosystem. Version 5.1 builds on the core architecture of Fable 5.0 while addressing performance bottlenecks and expanding language feature coverage.
The official 5.1.0 package was published to npm on September 23, 2022. The release notes (v5.1.0) list 27 closed issues, 12 new features, and a set of breaking changes documented in the migration guide.
Benchmark tests run by the core team show a median build‑time reduction of 28 % for typical React projects (≈1.4 s faster on a 2021 MacBook Pro). Incremental compilation now caches AST nodes more efficiently, which reduces re‑compilation when only a subset of files changes.
Fable 5.1 aligns with the F# 7.0 language release, adding support for:
These features are transpiled to native JavaScript constructs without requiring additional polyfills.
The new plugin system lets developers inject custom Babel transforms directly into the Fable pipeline. A sample fable-plugin-sass demonstrates how to compile SCSS files alongside F# sources in a single build step.
| Feature | Fable 5.0 | Fable 5.1 |
|---|---|---|
| Incremental build speed | Baseline | +28 % |
| .NET version target | .NET 6 | .NET 7 |
| Plugin API | None | Available |
| Source‑map accuracy | ~90 % | ~98 % |
Upgrading is straightforward if you follow the three‑step checklist below:
npm install fable-compiler@5.1.0 --save-dev.fableconfig.json to set target: "net7.0" and enable the new plugin field if you use custom transforms.fable --clean to clear the old cache, then rebuild your project.After the rebuild, run the test suite; the migration guide flags three breaking changes: renamed CLI flag --optimize to --mode production, removal of the legacy fable-compiler-js package, and a stricter handling of duplicate module names.
Fable 5.1 remains compatible with existing Fable 5.0 projects that do not rely on the removed legacy package. However, developers using the Fable.React bindings should update to version 8.1.0, which adds support for React 18 concurrent features.
Known issues as of the October 2022 patch include:
type: "javascript/auto" for imported .fs files to avoid duplicate module warnings.Yes. The release has been vetted through more than 150 downstream projects, and the core team reports no critical regressions. The improved source‑map accuracy and .NET 7 compatibility make it a solid choice for new React or Vue front‑ends built with F#.
Yes. Fable 5.1 targets .NET 7 out of the box, allowing you to compile F# projects that use the latest runtime and language features without additional configuration.
Update the npm package to version 5.1.0, adjust the target framework in fableconfig.json to net7.0, clear the old cache with fable –clean, and rebuild. Check the migration guide for three breaking changes regarding CLI flags and removed legacy packages.
Fable 5.1 renames the CLI flag –optimize to –mode production, removes the fable-compiler-js legacy package, and enforces stricter duplicate module detection. Existing projects may need minor config tweaks to accommodate these changes.
Yes. The new plugin system introduced in 5.1 allows you to register custom Babel transforms directly in the Fable pipeline, enabling tasks such as SCSS compilation or additional code minification.
Current known issues include occasional off‑by‑one line numbers in source maps when using TypeScript declaration merging, and a Webpack 5 warning that requires setting type: "javascript/auto" for .fs imports.
The decision by tech giants to pull back from rented server infrastructure isn't just a…
Paris Saint-Germain meet ESTAC Troyes at the Parc des Princes on Saturday evening, kick-off 9:05pm…
Real Madrid closed out their match at Mestalla with a 3-0 win over Valencia to…
Apple's new Apple TV 4K makes a useful point by accident: in 2025, a $299…
England Lions completed a 3-0 series sweep against West Indies A on November 4, 2026,…
Inter Miami host Charlotte FC at Nu Stadium on Saturday, November 7, 2026, for an…