Registry / babel-plugin-fbt-runtime

babel-plugin-fbt-runtime

JSON →
library1.0.0jsnpmunverified

Secondary Babel transform for the FBT internationalization framework, version 1.0.0. This plugin complements babel-plugin-fbt by transpiling fbt._(...) calls into runtime payloads consumable by the fbt runtime. It is required for end-to-end usage of the fbt library in production. The package has no release cadence; it is a companion to the broader fbt ecosystem maintained by Facebook. Alternative: no direct alternative for this specific transform step.

npm install babel-plugin-fbt-runtime
INSTALL
IMPORT
SIG · BABEL-PLUGIN-FBT-R
B
babel-plugin-fbt-runtime
javascriptv1.0.0
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

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

plugin
module.exports = require('babel-plugin-fbt-runtime')
import plugin from 'babel-plugin-fbt-runtime'
This is a Babel plugin, not a module with named exports. Use require in Babel config.

Setup Babel to use both fbt plugins: primary and runtime transforms.

// .babelrc { "plugins": [ ["module:babel-plugin-fbt", { "extraOptions": {} }], "babel-plugin-fbt-runtime" ] } // or babel.config.js module.exports = { plugins: [ [require('babel-plugin-fbt'), { /* options */ }], require('babel-plugin-fbt-runtime') ] };
Debug
Known issues
breakingThis plugin must come after babel-plugin-fbt in the plugins array.
fix
Ensure order: first babel-plugin-fbt, then babel-plugin-fbt-runtime.
affects: >=1.0.0
deprecatedThe package is not actively maintained; consider alternatives like i18next or react-intl.
fix
Migrate to a more modern i18n solution.
affects: >=1.0.0
gotchaYou must also install babel-plugin-fbt as a peer dependency; otherwise, the transform will fail at runtime.
fix
Run: npm install babel-plugin-fbt --save-dev
affects: >=1.0.0
Errors
Common errors & fixes
Error: Cannot find module 'babel-plugin-fbt-runtime'
Package not installed in project.
fix
npm install --save-dev babel-plugin-fbt-runtime
TypeError: fbt._ is not a function
Missing the runtime transform; fbt._ calls are not transpiled.
fix
Add 'babel-plugin-fbt-runtime' to your Babel plugins after babel-plugin-fbt.
Upgrade
Version history
1.0.0latest on npm
Audit
Dependencies
babel-plugin-fbtrequiredRequired peer dependency; this plugin expects the primary fbt transform to be present.
Agent activity
4 hits · last 30 days
node
4
Resources
babel-plugin-fbt-runtime — npm install babel-plugin-fbt-runtime · libregistry