Skip to content

jvilk/rollup-plugin-esnext

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rollup-plugin-esnext

Convert CommonJS modules to ES6 so they can be included in a Rollup bundle. Uses the excellent esnext module to perform conversions.

Installation

$ npm install --save-dev rollup-plugin-esnext

Usage

import { rollup } from 'rollup';
import esnext from 'rollup-plugin-esnext';

rollup({
  entry: 'main.js',
  plugins: [
    esnext({
      // We attempt to ignore non-CommonJS modules, but might be wrong!
      // Use this to specifically include/exclude particular files.
      include: 'node_modules/**',  // Default: undefined
      exclude: [ 'node_modules/foo/**', 'node_modules/bar/**' ],  // Default: undefined

      // search for files other than .js files (must already
      // be transpiled by a previous plugin!)
      extensions: [ '.js', '.coffee' ]  // Default: [ '.js' ]
    })
  ]
}).then(...)

License

MIT

About

Convert CommonJS modules to ES2015 using esnext

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published