rollup-plugin-browserify-transform

1.0.1 • Public • Published

rollup-plugin-browserify-transform

Build Status

Use any Browserify transform with Rollup.

Why?

There isn't an equivalent for every Browserify transform as Rollup plugin.

Installation

npm install --save-dev rollup-plugin-browserify-transform

Usage

// rollup.config.js
import browserifyPlugin from 'rollup-plugin-browserify-transform'
import brfs from 'brfs'
 
export default {
  entry: 'main.coffee',
 
  plugins: [
    browserifyPlugin(brfs)
  ]
}

Browserify transform plugin accepts options.include and options.exclude (each a minimatch pattern, or an array of minimatch patterns) to determine which files are handled by the Browserify transform. By default, all files are transpiled.

You can give Browserify transform options through a second argument.

// rollup.config.js
import browserifyPlugin from 'rollup-plugin-browserify-transform'
import coffeeify from 'coffeeify'
 
export default {
  entry: 'main.coffee',
 
  plugins: [
    browserifyPlugin(coffeeify, { bare: true })
  ]
}

Package Sidebar

Install

npm i rollup-plugin-browserify-transform

Weekly Downloads

385

Version

1.0.1

License

MIT

Last publish

Collaborators

  • lautis