forked from rails/rails
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrollup.config.js
47 lines (43 loc) · 899 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
import resolve from "@rollup/plugin-node-resolve"
import { terser } from "rollup-plugin-terser"
const terserOptions = {
mangle: false,
compress: false,
format: {
beautify: true,
indent_level: 2
}
}
export default [
{
input: "app/javascript/action_cable/index.js",
output: [
{
file: "app/assets/javascripts/actioncable.js",
format: "umd",
name: "ActionCable"
},
{
file: "app/assets/javascripts/actioncable.esm.js",
format: "es"
}
],
plugins: [
resolve(),
terser(terserOptions)
]
},
{
input: "app/javascript/action_cable/index_with_name_deprecation.js",
output: {
file: "app/assets/javascripts/action_cable.js",
format: "umd",
name: "ActionCable"
},
breakOnWarning: false,
plugins: [
resolve(),
terser(terserOptions)
]
},
]