-
Notifications
You must be signed in to change notification settings - Fork 18
/
rollup.config.js
50 lines (47 loc) · 1023 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
// rollup.config.js
import resolve from 'rollup-plugin-node-resolve';
import babel from 'rollup-plugin-babel';
var globals = {
'd3-interpolate': 'd3',
};
const config = {
input: 'index.js',
plugins: [
resolve(),
babel({
plugins: ['transform-object-assign'],
exclude: 'node_modules/**', // only transpile our source code
}),
],
external: Object.keys(globals),
output: [
// main UMD output
{
file: `build/d3-interpolate-path.js`,
name: 'd3',
format: 'umd',
indent: false,
extend: true,
globals: globals,
},
// copy main UMD output for use on docs site
{
file: `docs/d3-interpolate-path.js`,
name: 'd3',
format: 'umd',
indent: false,
extend: true,
globals: globals,
},
// main ES Modules output
{
file: `build/d3-interpolate-path.mjs`,
name: 'd3',
format: 'es',
indent: false,
extend: true,
globals: globals,
},
],
};
export default config;