{"id":26977,"library":"fable-babel-plugins","title":"Fable Babel Plugins","description":"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.","status":"maintenance","version":"2.3.0","language":"javascript","source_language":"en","source_url":"https://github.com/fable-compiler/Fable","tags":["javascript","fable","fsharp","F#"],"install":[{"cmd":"npm install fable-babel-plugins","lang":"bash","label":"npm"},{"cmd":"yarn add fable-babel-plugins","lang":"bash","label":"yarn"},{"cmd":"pnpm add fable-babel-plugins","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Required to use Babel plugin API","package":"@babel/core","optional":false},{"reason":"For AST node creation and manipulation","package":"@babel/types","optional":false}],"imports":[{"note":"ESM-only; only default export available as a function that returns the plugin visitor object.","wrong":"const plugin = require('fable-babel-plugins')","symbol":"default","correct":"import plugin from 'fable-babel-plugins'"},{"note":"TypeScript type definition for plugin options.","symbol":"PluginConfig","correct":"import { PluginConfig } from 'fable-babel-plugins'"},{"note":"Named export for programmatic plugin creation.","wrong":"const { createPlugin } = require('fable-babel-plugins')","symbol":"createPlugin","correct":"import { createPlugin } from 'fable-babel-plugins'"}],"quickstart":{"code":"import plugin from 'fable-babel-plugins';\nexport default {\n  plugins: [\n    [plugin, {\n      // options (if any)\n    }]\n  ]\n};","lang":"javascript","description":"Basic usage of the default export as a Babel plugin."},"warnings":[{"fix":"Use Fable's own plugin infrastructure; do not install this package directly.","message":"This package is deprecated in favor of Fable's integrated plugin system.","severity":"deprecated","affected_versions":">=5.0.0"},{"fix":"Use import syntax instead of require().","message":"Removed CommonJS support in v3; requires ESM.","severity":"breaking","affected_versions":">=3.0.0"},{"fix":"Check Fable documentation for plugin options per version.","message":"Plugin options have changed between major versions.","severity":"gotcha","affected_versions":">=2.0.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Run npm install fable-babel-plugins@2.3.0 (or the version matching your Fable setup).","cause":"Package not installed or not found in node_modules.","error":"Error: Cannot find module 'fable-babel-plugins'"},{"fix":"Use import plugin from 'fable-babel-plugins'.","cause":"Using a named export incorrectly or using require() in an ESM context.","error":"TypeError: plugin is not a function"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}