一覧へ戻る
jvilk/rollup-plugin-esnext(新しいタブで開きます)
主要言語: JavaScript
Convert CommonJS modules to ES2015 using esnext
- star 数
- 2
- watcher 数
- 1
- fork 数
- 0
- issue 数
- 0
- 最終更新
- 2016/11/13
主要言語: JavaScript
Convert CommonJS modules to ES2015 using esnext
Convert CommonJS modules to ES6 so they can be included in a Rollup bundle. Uses the excellent esnext module to perform conversions.
$ npm install --save-dev rollup-plugin-esnext
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(...)
MIT