-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrollup.config.js
52 lines (49 loc) · 969 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
51
52
import uglify from "rollup-plugin-uglify";
import strip from "rollup-plugin-strip";
import replace from "rollup-plugin-replace";
let input = "./src/markerfactory.js",
plugins = [
strip({
debugger: true,
functions: ["console.log", "assert.*", "debug", "alert"],
sourceMap: !!process.env.MINIFY
}),
replace({
const: "var",
let: "var"
})
],
output = [
{
file: "dist/markerfactory.js",
format: "umd",
exports: "named",
extend: true,
name: "MarkerFactory"
},
{
file: "dist/markerfactory.es6.js",
format: "es",
extend: true
}
];
if (process.env.MINIFY) {
plugins.push(
uglify({
mangle: false
})
);
output = {
file: "dist/markerfactory.min.js",
format: "umd",
exports: "named",
name: "MarkerFactory",
sourcemap: true,
extend: true
};
}
export default {
input: input,
plugins: plugins,
output: output
};