-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrollup.config.js
45 lines (41 loc) · 1.01 KB
/
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
const path = require('path');
const copy = require("rollup-plugin-copy");
const trash = require("rollup-plugin-delete");
const serve = require("rollup-plugin-serve");
const livereload = require("rollup-plugin-livereload");
const nodeResolve = require("rollup-plugin-node-resolve");
module.exports = {
input: 'src/main.js',
output: {
file: 'build/bundle.js',
format: 'umd',
sourcemap: true,
globals: {
"mobx": "mobx",
"d3": "d3"
}
},
plugins: [
nodeResolve(),
trash({
targets: ['build/*']
}),
copy({
targets: [{
src: [
"index.html",
"style.css",
"./node_modules/save-svg-as-png/lib/saveSvgAsPng.js",
"./node_modules/vizabi-ddfservice-reader/dist/vizabi-ddfservice-reader.js",
"./node_modules/vizabi-ddfservice-reader/dist/vizabi-ddfservice-reader.js.map"
],
dest: "build"
},{
src: "assets/",
dest: "build/"
}]
}),
serve('build'),
livereload()
]
};