rollup-plugin-polyfill
plugin to prepends bundles with a source file or module
Last updated a year ago by jrjurman .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install rollup-plugin-polyfill 
SYNC missed versions from official npm registry.

rollup-plugin-polyfill

Rollup Plugin to include a polyfill in your bundle. Literally injects a require or import statement in the beginning of your entry files. This is useful if you only want to include certain logic in some variants of your build.

API

polyfill(packages)

  • packages is a list of modules to be resolved in your bundle.

Usage

Check out the example folder to see more configurations

const polyfill = require('rollup-plugin-polyfill')
const resolve = require('rollup-plugin-node-resolve')
const commonjs = require('rollup-plugin-commonjs')

const plugins = [
  resolve(),
  commonjs(),
  polyfill(['es6-object-assign/auto', './string-reverse.js']),
]

export default {
  input: 'index.js',
  output: {
    file: 'bundle.js',
    format: 'iife',
    name: 'example'
  },
  plugins: plugins
}

Current Tags

  • 4.2.0                                ...           latest (a year ago)

7 Versions

  • 4.2.0                                ...           a year ago
  • 4.1.0                                ...           2 years ago
  • 4.0.0                                ...           3 years ago
  • 3.0.0                                ...           5 years ago
  • 2.0.1                                ...           7 years ago
  • 2.0.0                                ...           7 years ago
  • 1.0.0                                ...           7 years ago
Maintainers (1)
Downloads
Total 0
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (0)
None
Dev Dependencies (3)
Dependents (0)
None

© 2010 - cnpmjs.org x YWFE | Home | YWFE