-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathrollup.config.js
43 lines (38 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
import babel from 'rollup-plugin-babel';
var pkg = require('./package.json');
//Silence circular dependency of safetyedish calling itself in ./src/callbacks/onLayout/initResetButton.js
const onwarn = warning => {
// Silence circular dependency warning for moment
if (warning.code === 'CIRCULAR_DEPENDENCY')
return;
console.warn(`(!) ${warning.message}`);
}
module.exports = {
input: pkg.module,
onwarn,
output: {
name: pkg.main.replace(".js", ''),
file: pkg.main,
format: 'umd',
globals: {
d3: 'd3',
webcharts: 'webCharts'
},
},
external: (function() {
var dependencies = pkg.dependencies;
return Object.keys(dependencies);
}()),
plugins: [
babel({
exclude: 'node_modules/**',
presets: [
[ 'env', {modules: false} ]
],
plugins: [
'external-helpers'
],
babelrc: false
})
]
};