fly-rollup

raw JSON →
2.1.0 verified Mon Apr 27 auth: no javascript maintenance

Rollup plugin for the Fly build system (fly-rollup v2.1.0). Allows using Rollup as a transformation step within Fly pipelines with async/await or generator syntax. Supports passing Rollup and bundle options, sourcemap configuration. Requires Node >= 4.6 and the Fly task runner. Last updated ca. 2017, no recent maintenance. Alternatives: use Rollup directly or other build tools.

error Error: Cannot find module 'fly-rollup'
cause Missing fly-rollup in dependencies or Node modules.
fix
Run: npm install --save-dev fly-rollup
error TypeError: fly.source(...).rollup is not a function
cause fly-rollup not loaded as a plugin; Fly cannot find it.
fix
Ensure fly-rollup is installed and Fly is run from the project root.
error Error: rollup options must be an object
cause Wrong call signature: .rollup() called without arguments or with non-object.
fix
Use .rollup({ rollup: {...}, bundle: {...} })
gotcha Plugin is not a Node module but a Fly extension; do not require() it.
fix Install as dependency and let Fly load it automatically.
deprecated Generator function flavor is legacy; async/await is preferred.
fix Use async/await syntax for better error handling and readability.
gotcha Requires Fly task runner installed separately; not standalone.
fix Install fly globally or as a dev dependency: npm i -D fly
breaking Old versions incompatible with Rollup 1.x+ due to API changes.
fix Upgrade to fly-rollup 2.x and align with Rollup API.
npm install fly-rollup
yarn add fly-rollup
pnpm add fly-rollup

Shows basic usage of fly-rollup with async/await and generator syntax, including rollup options, bundle format, and sourcemap.

// Install: npm i --save-dev fly fly-rollup
// In flyfile.mjs or flyfile.js:

// async/await version
export async function roll(fly) {
  await fly
    .source('src/entry.js')
    .rollup({
      rollup: {
        plugins: [
          require('rollup-plugin-babel')()
        ]
      },
      bundle: {
        format: 'es'
      }
    })
    .target('dist');
}

// Generator version
exports.roll = function* (fly) {
  yield fly
    .source('src/entry.js')
    .rollup({
      rollup: {
        plugins: []
      },
      bundle: {
        format: 'iife',
        sourceMap: 'inline'
      }
    })
    .target('dist');
};