rollup-stream-gulp

raw JSON →
0.0.3 verified Mon Apr 27 auth: no javascript

A Gulp plugin for Rollup that provides a streamlined pipeline integration. Current version 0.0.3, maintained by the community as a candidate for becoming @rollup/gulp. Unlike @rollup/stream, it avoids needing vinyl-source-stream, supports multiple output files per stream, and enables manualChunks. Ships TypeScript types and targets Rollup ^2 and Vinyl ^2.2.1. Suitable for Gulp-based build pipelines requiring Rollup bundling with full flexibility.

error TypeError: rollup is not a function
cause Using require('rollup-stream-gulp') and calling as a function without default import
fix
Use import rollup from 'rollup-stream-gulp' or const { default: rollup } = require('rollup-stream-gulp')
error Error: Cannot find module 'rollup'
cause Missing peer dependency rollup
fix
Install rollup: npm install rollup@^2
error TypeError: Cannot read property 'pipe' of undefined
cause Rollup options not passed correctly (e.g., options object missing)
fix
Ensure rollup({}) is called with at least an empty object.
gotcha The plugin internally sets `options.input = file.path`, overriding any user-provided input option. This means you cannot specify a different input via options; use gulp.src instead.
fix Do not pass `input` in options; use gulp.src to set the entry file.
gotcha Only supports Rollup v2 (peer dependency). Using with Rollup v3 or higher may cause breakage.
fix Ensure Rollup version is ^2.x.
gotcha File conflict errors may not be reported correctly because input is overridden. Errors may be silent.
fix Manually check for duplicates in gulp.src.
npm install rollup-stream-gulp
yarn add rollup-stream-gulp
pnpm add rollup-stream-gulp

Basic Gulp task that bundles a TypeScript entry point using Rollup and outputs to dist.

import gulp from 'gulp';
import rollup from 'rollup-stream-gulp';

export const build = async () =>
  gulp.src('src/index.ts')
    .pipe(rollup({
      input: 'src/index.ts',
      output: {
        format: 'es',
        file: 'dist/bundle.js',
      },
    }))
    .pipe(gulp.dest('dist'));