Registry / devops / fly-babel

fly-babel

JSON →
library2.1.1jsnpmunverified

Babel plugin for the Fly build system, version 2.1.1. It allows you to transpile ES6/ES2015+ code using Babel within Fly pipelines. The plugin supports standard Babel options (presets, plugins, sourceMaps, etc.) and a preload feature that automatically loads Babel plugins/presets from package.json. Release cadence is low; last release was in 2018. Key differentiator: tight integration with Fly, including preloading and simple generator-based task syntax. Requires Node >= 4.6 and Fly 2.0+.

npm install fly-babel
INSTALL
IMPORT
SIG · FLY-BABEL
F
fly-babel
devopsjavascriptv2.1.1
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.

fly-babel plugin
const flyBabel = require('fly-babel'); // used internally by Fly, no direct import in user code
import flyBabel from 'fly-babel';
Plugin is mounted via Fly's system; user does not import directly. Instead, configure in .fly.js or flyfile.js.
.babel()
yield fly.source('src/**/*.js').babel({ presets: ['es2015'] }).target('dist/');
fly.source('src/**/*.js').babel().target();
Method is chained on Fly's source/target stream. Must be inside a generator function (function *).
options.preload
yield fly.source('src/**/*.js').babel({ preload: true }).target('dist/');
yield fly.source('src/**/*.js').babel({ preload: false });
preload: true automatically loads Babel plugins/presets from package.json. Default false.

Shows basic usage of fly-babel with Babel presets and source maps in a Fly task.

// In your flyfile.js const fly = require('fly'); export default function* (fly) { yield fly.source('src/**/*.js') .babel({ presets: ['@babel/preset-env'], sourceMaps: 'inline' }) .target('dist/'); }
Debug
Known issues
breakingVersion 2.1.0 dropped Node 4.x support; requires Node >= 6.x.
fix
Upgrade Node to >=6.x, or use fly-babel@0.2.1 for Node 4.x support.
affects: >=2.1.0
deprecatedThis plugin is for the legacy Fly build system (flyjs). Fly is no longer maintained.
fix
Consider migrating to modern build tools like Webpack, Rollup, or esbuild.
affects: *
gotchaThe .babel() method must be called inside a generator function (function *). Using async/await or regular functions will fail.
fix
Use 'function * (fly) { ... }' syntax. Promises are not supported.
affects: *
gotchapreload: true only works if babel plugins/presets are listed in package.json under 'devDependencies' or 'dependencies' and named conventionally (e.g., 'babel-preset-*' or 'babel-plugin-*').
fix
Ensure packages are installed and named properly. For custom names, configure presets/plugins manually.
affects: *
gotchaSource maps may not work correctly if the source is processed by multiple plugins (e.g., fly-clear or fly-concat).
fix
Test source map output; consider using 'inline' or 'both' for simpler debugging.
affects: *
Errors
Common errors & fixes
TypeError: fly.source(...).babel is not a function
fly-babel plugin not installed or not registered with Fly.
fix
Run `npm install --save-dev fly-babel` and ensure Fly is configured to load the plugin (e.g., via 'fly clear' or plugin registration).
Error: Couldn't find preset 'es2015' relative to directory
Required Babel preset not installed.
fix
Install the preset: `npm install --save-dev @babel/preset-env` (or babel-preset-es2015 for older Babel).
ReferenceError: regeneratorRuntime is not defined
Using ES6 generators (async/await) without proper Babel runtime polyfill.
fix
Install and configure 'babel-plugin-transform-runtime' or include 'babel-polyfill' in your code.
Upgrade
Version history
2.1.1latest on npm
Audit
Dependencies
flyrequiredPeer dependency; requires Fly 2.0+ to mount plugin.
Agent activity
2 hits · last 30 days
node
2
Resources
fly-babel — npm install fly-babel · libregistry