m3u8-parser/scripts/modules.rollup.config.js
Pim b23e93f70c Update rollup and multi-entry plugin (#32)
* update rollup

* use camelCase for the module name
2017-11-21 13:00:39 -05:00

37 lines
875 B
JavaScript

/**
* Rollup configuration for packaging the plugin in a module that is consumable
* by either CommonJS (e.g. Node or Browserify) or ECMAScript (e.g. Rollup).
*
* These modules DO NOT include their dependencies as we expect those to be
* handled by the module system.
*/
import babel from 'rollup-plugin-babel';
import json from 'rollup-plugin-json';
export default {
name: 'm3u8Parser',
input: 'src/index.js',
legacy: true,
plugins: [
json(),
babel({
babelrc: false,
exclude: 'node_modules/**',
presets: [
'es3',
['es2015', {
loose: true,
modules: false
}]
],
plugins: [
'external-helpers',
'transform-object-assign'
]
})
],
output: [
{file: 'dist/m3u8-parser.cjs.js', format: 'cjs'},
{file: 'dist/m3u8-parser.es.js', format: 'es'}
]
};