forked from visjs/vis-timeline
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrollup.config.js
45 lines (44 loc) · 978 Bytes
/
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
import commonjs from 'rollup-plugin-commonjs';
import nodeResolve from 'rollup-plugin-node-resolve';
import nodeBuiltins from 'rollup-plugin-node-builtins';
import babel from 'rollup-plugin-babel';
import { uglify } from "rollup-plugin-uglify";
import banner from 'rollup-plugin-banner';
import genHeader from './lib/header';
import css from 'rollup-plugin-css-porter';
export default [{
input: 'index.js',
output: {
file: 'dist/vis-timeline-graph2d.esm.js',
format: 'esm',
},
plugins: [
commonjs(),
nodeBuiltins(),
nodeResolve(),
babel(),
banner(genHeader('timeline-graph2d')),
css({
dest: 'dist/vis-timeline-graph2d.css'
}),
],
}, {
input: 'index.js',
output: {
file: 'dist/vis-timeline-graph2d.min.js',
name: 'vis',
exports: 'named',
format: 'umd'
},
plugins: [
commonjs(),
nodeBuiltins(),
nodeResolve(),
babel(),
uglify(),
banner(genHeader('timeline-graph2d')),
css({
dest: 'dist/vis-timeline-graph2d.css'
})
]
}];