-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathrollup.config.js
37 lines (36 loc) · 955 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
import {terser} from "rollup-plugin-terser";
import typescript from "@rollup/plugin-typescript";
import copy from "rollup-plugin-copy";
export default {
input: "src/index.ts",
output: [
{
file: "docs/bundle.js",
format: "iife",
plugins: [],
globals: {
"d3": "d3",
"d3-hierarchy": "d3"
},
},
{
file: "docs/bundle.min.js",
format: "iife",
plugins: [terser()],
globals: {
"d3": "d3",
"d3-hierarchy": "d3"
},
},
],
plugins: [
typescript(),
copy({
targets: [
{ src: "node_modules/d3/dist/d3.min.js", dest: "docs/" },
{ src: "node_modules/d3-hierarchy/dist/d3-hierarchy.min.js", dest: "docs/" },
]
}),
],
external: ["d3", "d3-hierarchy"]
}