-
Notifications
You must be signed in to change notification settings - Fork 24
/
rollup.config.js
46 lines (43 loc) · 1.22 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
45
46
const pkg = require('./package.json');
const { babel } = require('@rollup/plugin-babel');
const banner = `/*!\n * ${pkg.name} v${pkg.version}\n * LICENSE : ${pkg.license}\n * (c) 2016-${new Date().getFullYear()} maptalks.com\n */`;
const plugins = [babel({ babelHelpers: 'bundled' })];
const external = ['maptalks', 'echarts'];
const globals = {
'maptalks': 'maptalks',
'echarts': 'echarts'
};
module.exports = [
{
input: 'index.js',
plugins,
external,
output: [
{
'sourcemap': false,
'format': 'es',
'banner': banner,
globals,
'file': pkg.module
},
{
'sourcemap': false,
'format': 'umd',
'banner': banner,
'extend': true,
'name': 'maptalks',
globals,
'file': pkg.main
},
{
'sourcemap': false,
'format': 'umd',
'banner': banner,
'extend': true,
'name': 'maptalks',
globals,
'file': 'dist/maptalks.e3.min.js'
}
]
}
];