-
Notifications
You must be signed in to change notification settings - Fork 0
/
rollup.config.js
53 lines (51 loc) · 1003 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
53
import elm from "rollup-plugin-elm";
import { terser } from "rollup-plugin-terser";
import { builtinModules } from "module";
import resolve from "rollup-plugin-node-resolve";
/** @type {import("rollup").RollupOptions} */
const config = {
input: "src/index.js",
output: {
file: "dist/main.js",
format: "cjs",
banner: "#!/usr/bin/env node"
},
plugins: [
elm({
exclude: "elm-stuff/**",
compiler: {
optimize: true
}
}),
terser({
mangle: true,
compress: {
pure_funcs: [
"F2",
"F3",
"F4",
"F5",
"F6",
"F7",
"F8",
"F9",
"A2",
"A3",
"A4",
"A5",
"A6",
"A7",
"A8",
"A9"
],
pure_getters: true,
keep_fargs: false,
unsafe_comps: true,
unsafe: true
}
}),
resolve()
],
external: builtinModules
};
export default config;