Fable Babel Plugins

raw JSON →
2.3.0 verified Fri May 01 auth: no javascript maintenance

Babel plugins used by the Fable compiler, an F# to JavaScript/TypeScript/Python/Dart/Rust/Beam transpiler. The package is part of the Fable ecosystem. As of v5.0.0, Fable supports multiple compilation targets. The fable-babel-plugins package is typically not installed directly but pulled in as a dependency of the Fable compiler. Its release cadence follows Fable's. Key differentiators: these plugins handle F# specific transformations in the Babel pipeline. Note: The package has been largely superseded by Fable's integrated plugin system.

error Error: Cannot find module 'fable-babel-plugins'
cause Package not installed or not found in node_modules.
fix
Run npm install fable-babel-plugins@2.3.0 (or the version matching your Fable setup).
error TypeError: plugin is not a function
cause Using a named export incorrectly or using require() in an ESM context.
fix
Use import plugin from 'fable-babel-plugins'.
deprecated This package is deprecated in favor of Fable's integrated plugin system.
fix Use Fable's own plugin infrastructure; do not install this package directly.
breaking Removed CommonJS support in v3; requires ESM.
fix Use import syntax instead of require().
gotcha Plugin options have changed between major versions.
fix Check Fable documentation for plugin options per version.
npm install fable-babel-plugins
yarn add fable-babel-plugins
pnpm add fable-babel-plugins

Basic usage of the default export as a Babel plugin.

import plugin from 'fable-babel-plugins';
export default {
  plugins: [
    [plugin, {
      // options (if any)
    }]
  ]
};