Registry / devops / fable-babel-plugins

fable-babel-plugins

JSON →
library2.3.0jsnpmunverified

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.

npm install fable-babel-plugins
INSTALL
IMPORT
SIG · FABLE-BABEL-PLUGIN
F
fable-babel-plugins
devopsjavascriptv2.3.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

default
import plugin from 'fable-babel-plugins'
const plugin = require('fable-babel-plugins')
ESM-only; only default export available as a function that returns the plugin visitor object.
PluginConfig
import { PluginConfig } from 'fable-babel-plugins'
TypeScript type definition for plugin options.
createPlugin
import { createPlugin } from 'fable-babel-plugins'
const { createPlugin } = require('fable-babel-plugins')
Named export for programmatic plugin creation.

Basic usage of the default export as a Babel plugin.

import plugin from 'fable-babel-plugins'; export default { plugins: [ [plugin, { // options (if any) }] ] };
Debug
Known issues
deprecatedThis package is deprecated in favor of Fable's integrated plugin system.
fix
Use Fable's own plugin infrastructure; do not install this package directly.
affects: >=5.0.0
breakingRemoved CommonJS support in v3; requires ESM.
fix
Use import syntax instead of require().
affects: >=3.0.0
gotchaPlugin options have changed between major versions.
fix
Check Fable documentation for plugin options per version.
affects: >=2.0.0
Errors
Common errors & fixes
Error: Cannot find module 'fable-babel-plugins'
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).
TypeError: plugin is not a function
Using a named export incorrectly or using require() in an ESM context.
fix
Use import plugin from 'fable-babel-plugins'.
Upgrade
Version history
2.3.0latest on npm
Audit
Dependencies
@babel/corerequiredRequired to use Babel plugin API
@babel/typesrequiredFor AST node creation and manipulation
Agent activity
6 hits · last 30 days
node
6
Resources
fable-babel-plugins — npm install fable-babel-plugins · libregistry