forked from gitbrent/bootstrap4-toggle
-
-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathrollup.config.js
More file actions
77 lines (74 loc) · 1.51 KB
/
rollup.config.js
File metadata and controls
77 lines (74 loc) · 1.51 KB
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
import terser from "@rollup/plugin-terser";
import dts from "rollup-plugin-dts";
const mainConfig = {
input: "src/main/js/index.js",
output: [
{
file: "dist/bootstrap5-toggle.cjs",
format: "cjs",
sourcemap: false,
plugins: [terser()]
},
{
file: "dist/bootstrap5-toggle.mjs",
format: "es",
sourcemap: false,
plugins: [terser()]
}
]
};
const typesConfig = {
input: "src/main/@types/index.d.ts",
output: {
file: "dist/bootstrap5-toggle.d.ts",
format: "es"
},
plugins: [
dts({
respectExternal: true,
})
]
};
export default [
{
input: "src/main/js/index.ecmas.js",
output: [
{
file: "js/bootstrap5-toggle.ecmas.js",
format: "umd",
sourcemap: true
},
{
file: "js/bootstrap5-toggle.ecmas.min.js",
format: "umd",
sourcemap: true,
plugins: [terser()]
}
]
},
{
input: "src/main/js/index.jquery.js",
external: ["jquery"],
output: [
{
file: "js/bootstrap5-toggle.jquery.js",
format: "umd",
sourcemap: true,
globals: {
jquery: "jQuery"
}
},
{
file: "js/bootstrap5-toggle.jquery.min.js",
format: "umd",
sourcemap: true,
globals: {
jquery: "jQuery"
},
plugins: [terser()]
}
]
},
mainConfig,
typesConfig,
];