-
Notifications
You must be signed in to change notification settings - Fork 0
/
rollup.config.js
53 lines (49 loc) · 989 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
46
47
48
49
50
51
52
53
import babel from 'rollup-plugin-babel';
import { eslint } from 'rollup-plugin-eslint';
import resolve from 'rollup-plugin-node-resolve';
let pluginOptions = [
resolve({
browser: true
}),
eslint(),
babel({
presets: [
[
"@babel/preset-env", {
forceAllTransforms: true,
modules: false,
targets: {
browsers: [
'Firefox 57',
'Edge 15',
'Chrome 60',
'iOS 10',
'Safari 10'
]
}
}
]
],
babelrc: false,
exclude: 'node_modules/**'
})
];
const d3External = [
'd3-selection'
]
const globals = {}
d3External.forEach(k => {
globals[k] = 'd3'
})
export default {
input: 'index.js',
output: {
name: 'd3',
format: 'umd',
file: 'build/d3-json-controller.js',
extend: true,
globals: globals,
},
external: d3External,
plugins: pluginOptions
}