-
Notifications
You must be signed in to change notification settings - Fork 0
/
rollup.config.mjs
45 lines (44 loc) · 972 Bytes
/
rollup.config.mjs
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
import resolve from "@rollup/plugin-node-resolve"
import terser from "@rollup/plugin-terser"
export default [
{
input: "tables/application.js",
output: [
{
name: "tables",
file: "app/assets/builds/katalyst/tables.esm.js",
format: "esm",
},
{
file: "app/assets/builds/katalyst/tables.js",
format: "es",
},
],
context: "window",
plugins: [
resolve({
modulePaths: ["app/javascript"]
})
],
external: ["@hotwired/stimulus", "@hotwired/turbo-rails"]
},
{
input: "tables/application.js",
output: {
file: "app/assets/builds/katalyst/tables.min.js",
format: "es",
sourcemap: true,
},
context: "window",
plugins: [
resolve({
modulePaths: ["app/javascript"]
}),
terser({
mangle: true,
compress: true
})
],
external: ["@hotwired/stimulus", "@hotwired/turbo-rails"]
}
]