videojs-vtt-thumbnails/scripts/umd.rollup.config.js
2017-11-10 12:15:08 -05:00

51 lines
1.0 KiB
JavaScript

/**
* Rollup configuration for packaging the plugin in a module that is consumable
* as the `src` of a `script` tag or via AMD or similar client-side loading.
*
* This module DOES include its dependencies.
*/
import babel from 'rollup-plugin-babel';
import commonjs from 'rollup-plugin-commonjs';
import json from 'rollup-plugin-json';
import resolve from 'rollup-plugin-node-resolve';
export default {
name: 'videojsVttThumbnails',
input: 'src/plugin.js',
output: {
file: 'dist/videojs-vtt-thumbnails.js',
format: 'umd'
},
external: [
'video.js'
],
globals: {
'video.js': 'videojs'
},
plugins: [
resolve({
browser: true,
main: true,
jsnext: true
}),
json(),
commonjs({
sourceMap: false
}),
babel({
babelrc: false,
exclude: 'node_modules/**',
presets: [
['es2015', {
loose: true,
modules: false
}]
],
plugins: [
'external-helpers',
'transform-object-assign'
]
})
]
};