-
-
Notifications
You must be signed in to change notification settings - Fork 314
/
rollup.config.mjs
108 lines (107 loc) · 2.36 KB
/
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
import resolve from "@rollup/plugin-node-resolve"
import commonjs from "@rollup/plugin-commonjs"
import terser from "@rollup/plugin-terser"
export default [
{
input: "node_modules/clipboard/dist/clipboard.min.js",
output: {
file: "vendor/javascript/clipboard.min.js"
},
context: "window"
},
{
input: "node_modules/cropperjs/dist/cropper.esm.js",
output: {
file: "vendor/javascript/cropperjs.min.js"
},
plugins: [terser()],
context: "window"
},
{
input: "node_modules/flatpickr/dist/esm/index.js",
output: {
file: "vendor/javascript/flatpickr.min.js"
},
plugins: [resolve(), terser()],
context: "window"
},
{
input: "node_modules/handlebars/dist/handlebars.min.js",
output: {
file: "vendor/javascript/handlebars.min.js"
},
context: "window"
},
{
input: "node_modules/jquery/dist/jquery.min.js",
output: {
file: "vendor/javascript/jquery.min.js"
},
context: "window"
},
{
input: "node_modules/keymaster/keymaster.js",
output: {
file: "vendor/javascript/keymaster.min.js"
},
plugins: [terser()],
context: "window"
},
{
input: "node_modules/sortablejs/modular/sortable.esm.js",
output: {
file: "vendor/javascript/sortable.min.js"
},
plugins: [terser()]
},
{
input: "node_modules/select2/select2.min.js",
output: {
file: "vendor/javascript/select2.min.js"
},
context: "window"
},
{
input: "node_modules/@ungap/custom-elements/min.js",
output: {
file: "vendor/javascript/ungap-custom-elements.min.js"
}
},
{
input: "node_modules/@rails/ujs/app/assets/javascripts/rails-ujs.esm.js",
output: {
file: "vendor/javascript/rails-ujs.min.js"
},
plugins: [terser()]
},
{
input: "bundles/shoelace.js",
output: {
file: "vendor/javascript/shoelace.min.js"
},
plugins: [resolve(), terser()]
},
{
input: "bundles/tinymce.js",
output: {
file: "vendor/javascript/tinymce.min.js",
name: "tinymce",
format: "esm"
},
plugins: [
resolve({
modulePaths: ["app/javascript"]
}),
commonjs(),
terser()
]
},
{
input: "app/javascript/preview.js",
output: {
file: "app/assets/builds/alchemy/preview.min.js"
},
context: "window",
plugins: [terser()]
}
]