-
Notifications
You must be signed in to change notification settings - Fork 21
/
Copy pathrollup.config.js
48 lines (46 loc) · 1.04 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
import babel from "rollup-plugin-babel";
import { uglify } from "rollup-plugin-uglify";
import json from "rollup-plugin-json";
import pkg from "./package.json";
export default [
{
input: "src/elastic_app_search.js",
output: [
{
// browser-friendly UMD build, for Browsers or Node
name: "ElasticAppSearch",
file: "dist/elastic_app_search.umd.js",
format: "umd"
},
{
// ES6 module build, for things like Rollup
file: pkg.module,
format: "es"
}
],
plugins: [
json(), // So we can import thing like `package.json` as a module
babel({
exclude: "node_modules/**" // only transpile our source code
})
]
},
{
input: "src/elastic_app_search.js",
output: [
{
// Minified UMD build
name: "ElasticAppSearch",
file: "dist/elastic_app_search.umd.min.js",
format: "umd"
}
],
plugins: [
json(),
babel({
exclude: "node_modules/**"
}),
uglify()
]
}
];