-
Notifications
You must be signed in to change notification settings - Fork 59
/
Copy pathmodules.rollup.config.js
50 lines (49 loc) · 1.08 KB
/
modules.rollup.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
/**
* 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 {
input: 'src/plugin.js',
output: [{
name: 'videojsVttThumbnails',
file: 'dist/videojs-vtt-thumbnails.cjs.js',
format: 'cjs',
globals: {
'video.js': 'videojs'
}
}, {
name: 'videojsVttThumbnails',
file: 'dist/videojs-vtt-thumbnails.es.js',
format: 'es',
globals: {
'video.js': 'videojs'
}
}],
external: [
'global',
'global/document',
'global/window',
'video.js'
],
plugins: [
json(),
babel({
babelrc: false,
exclude: 'node_modules/**',
presets: [
['@babel/preset-env', {
loose: true,
modules: false
}]
],
plugins: [
'@babel/transform-object-assign'
]
})
]
};