A wrapper for rollup that produces a stream of Vinyl objects.
Last updated 4 months ago by coreyfarrell .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install vinyl-rollup 
SYNC missed versions from official npm registry.


Travis CI Greenkeeper badge NPM Version NPM Downloads MIT

A wrapper for rollup that produces a stream of Vinyl objects.

Install vinyl-rollup

This module requires node.js 8 or above. All testing is done using the esm loader.


This example shows use of esm with gulp.

npm i -D rollup vinyl-rollup gulp pump esm

Create gulpfile.esm.js.

import gulp from 'gulp';
import pump from 'pump';
import vinylRollup from 'vinyl-rollup';
import rollupConfig from './rollup.config.js';

export function build() {
	return pump(
			rollup: rollupConfig,
			copyModules: true,
			modulePath: 'node_modules'
		gulp.dest('build', {sourcemaps: '.'})

Create rollup.config.js for your application. See the rollup guide.

Option rollup

This object is used as the rollup configuration. If rollup.output.file is missing it will be set to the value of rollup.input. If rollup.output.vinylOpts is set it will be removed from the rollup output config and used as the default vinyl object options for the bundle output. This does not effect creation vinyl objects created for the copyModules option.

Option copyModules

By default this module will merge streams including package.json and license files from any external module that provided sources to the bundle. Setting copyModules to true will cause all files from these modules to be added to the stream, setting copyModules to false will disable copying any original files from bundled modules.

This option only has an effect if rollup is able to resolve 'external' modules. See rollup-plugin-node-resolve or rollup-plugin-babel with babel-plugin-bare-import-rewrite.

Option modulePath

Default value: 'node_modules'.

This is used by copyModules. Each bundled source is checked against this path so the list of included external modules can be calculated.

Running tests

Tests are provided by xo and ava.

npm install
npm test

Current Tags

  • 0.6.2                                ...           latest (4 months ago)

11 Versions

  • 0.6.2                                ...           4 months ago
  • 0.6.1                                ...           5 months ago
  • 0.6.0                                ...           5 months ago
  • 0.5.1                                ...           8 months ago
  • 0.5.0                                ...           9 months ago
  • 0.4.2                                ...           10 months ago
  • 0.4.1                                ...           a year ago
  • 0.4.0                                ...           a year ago
  • 0.3.0                                ...           a year ago
  • 0.2.0                                ...           a year ago
  • 0.1.0                                ...           a year ago
Maintainers (1)
Today 0
This Week 11
This Month 11
Last Day 0
Last Week 0
Last Month 0
Dependencies (6)
Dev Dependencies (13)
Dependents (0)

Copyright 2014 - 2016 © |