{"id":22315,"library":"rollup-stream","title":"rollup-stream","description":"A wrapper around Rollup that returns a readable stream instead of a Promise, designed to integrate Rollup with Gulp. Works with Rollup options passed directly, supports caching, sourcemaps, and custom Rollup versions. Last updated 2018-06-17, pinned to Rollup <1.0.0 (pre-Rollup 1.0 API). Not compatible with Rollup 1.0+ due to breaking API changes. Alternatives: gulp-rollup, @rollup/plugin-buble.","status":"deprecated","version":"1.24.1","language":"javascript","source_language":"en","source_url":"https://github.com/permutatrix/rollup-stream","tags":["javascript","rollup","gulpfriendly"],"install":[{"cmd":"npm install rollup-stream","lang":"bash","label":"npm"},{"cmd":"yarn add rollup-stream","lang":"bash","label":"yarn"},{"cmd":"pnpm add rollup-stream","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Peer dependency – the actual bundler. Must be < 1.0.0 (e.g., 0.x). The package pins rollup@^0.67.0.","package":"rollup","optional":false}],"imports":[{"note":"Package provides a default export, not named. Use default import or destructure from default.","wrong":"const rollup = require('rollup-stream');","symbol":"default (rollupStream)","correct":"import rollupStream from 'rollup-stream';"},{"note":"The 'bundle' event is emitted after bundling, prior to streaming. Cache must be passed in options and updated here.","wrong":"rollupStream(options).on('bundle', ...) with arrow function returning it – the event is only emitted once.","symbol":"bundle event","correct":"const stream = rollupStream(options); stream.on('bundle', (bundle) => { cache = bundle; })"},{"note":"Must use vinyl-source-stream to convert the emitted stream into a vinyl file object for Gulp.","wrong":"rollupStream(options).pipe(fs.createWriteStream('out')) – it expects vinyl pipes, not raw streams.","symbol":"source plugin usage","correct":"const source = require('vinyl-source-stream'); rollupStream(options).pipe(source('output.js'))"}],"quickstart":{"code":"const gulp = require('gulp');\nconst rollupStream = require('rollup-stream');\nconst source = require('vinyl-source-stream');\n\ngulp.task('bundle', function() {\n  return rollupStream({\n    input: './src/main.js'\n  })\n  .pipe(source('app.js'))\n  .pipe(gulp.dest('./dist'));\n});","lang":"javascript","description":"Bundle with Rollup via Gulp using rollup-stream, converting the readable stream to a vinyl file."},"warnings":[{"fix":"Use gulp-rollup or @rollup/plugin-buble instead, or downgrade Rollup to <1.0.0.","message":"Incompatible with Rollup >= 1.0.0. Options API changed; rollup-stream expects old Rollup 0.x options.","severity":"breaking","affected_versions":">=1.0.0"},{"fix":"Migrate to gulp-rollup or directly use Rollup API with gulp-wrapper.","message":"Package is effectively unmaintained (last publish 2018). Not designed for Rollup 1/2/3.","severity":"deprecated","affected_versions":"*"},{"fix":"Ensure options do not conflict between input (rollup) and output (generate) settings.","message":"Options object is passed directly to both rollup() and generate() – no validation of overlapping options.","severity":"gotcha","affected_versions":"*"},{"fix":"Attach .on('bundle', callback) directly to the rollupStream() return value before any .pipe().","message":"Caching: The 'bundle' event must be listened on the stream before piping, else cache won't update effectively.","severity":"gotcha","affected_versions":"*"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"npm install rollup@0.68.2 (or any 0.x version)","cause":"rollup is a peer dependency; not installed automatically.","error":"Error: Cannot find module 'rollup'"},{"fix":"const rollupStream = require('rollup-stream').default; or use ES import with default.","cause":"Default import/require mishandled – package exports default, not named.","error":"TypeError: rollupStream is not a function"},{"fix":"Ensure rollupStream({input: './src/main.js'}) with correct path.","cause":"Missing 'input' option or invalid path.","error":"The \"path\" argument must be of type string. Received undefined"},{"fix":"Rollup 0.x expects output options like dest, format. Pass them as top-level or use output key.","cause":"rollup 0.x required both options; rollup-stream passes all to both rollup and generate.","error":"Error: You must specify input and output options."}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}