-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathrollup.config.js
47 lines (45 loc) · 1.08 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
import resolve from 'rollup-plugin-node-resolve';
import replace from 'rollup-plugin-replace';
import babel from 'rollup-plugin-babel';
import serve from 'rollup-plugin-serve';
import livereload from 'rollup-plugin-livereload';
import html from 'rollup-plugin-html';
const isProd = process.env.NODE_ENV === 'production';
export default {
input: 'src/index.js',
output: {
name: 'Leaflet.SwoopyArrow',
file: 'build/Leaflet.SwoopyArrow.js',
sourcemap: true,
globals: {
'leaflet': 'L'
},
format: 'umd'
},
external: [
'leaflet',
],
plugins: [
resolve(),
replace({
'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV)
}),
babel({
presets: [
["es2015", {"modules": false}]
],
plugins: ["external-helpers"],
exclude: 'node_modules/**'
}),
!isProd && livereload({
watch: ['docs', 'playground', 'build']
}),
!isProd && serve({
port: 3000,
contentBase: ['playground', 'docs', 'build']
}),
!isProd && html({
include: 'playground/index.html'
})
]
};