forked from w8r/martinez
-
Notifications
You must be signed in to change notification settings - Fork 0
/
rollup.config.js
49 lines (46 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
44
45
46
47
48
49
import resolve from 'rollup-plugin-node-resolve';
import commonjs from 'rollup-plugin-commonjs';
import buble from 'rollup-plugin-buble';
import { version, author, license, description } from './package.json';
const name = 'martinez';
const banner = `\
/**
* ${name} v${version}
* ${description}
*
* @author ${author}
* @license ${license}
* @preserve
*/
`;
module.exports = [{
input: './index.js',
output: {
file: `dist/${name}.umd.js`,
name: 'martinez',
sourcemap: true,
format: 'umd',
banner
},
plugins: [
resolve(), // so Rollup can find external libs
commonjs(), // so Rollup can convert commonJS to an ES module
buble()
]
}, {
input: 'demo/js/index.js',
output: {
file: 'demo/js/bundle.js',
format: 'iife',
globals: {
leaflet: 'L',
jsts: 'jsts'
}
},
external: ['jsts', 'leaflet'],
plugins: [
resolve(), // so Rollup can find external libs
commonjs(), // so Rollup can convert commonJS to an ES module
buble()
]
}];