-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrollup.config.mjs
48 lines (46 loc) · 941 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
46
47
48
/*
* Copyright (c) 1986-2023 Ecmel Ercan (https://ecmel.dev/)
* Licensed under the MIT License
*/
import { cleandir } from "rollup-plugin-cleandir";
import terser from "@rollup/plugin-terser";
import typescript from "@rollup/plugin-typescript";
import copy from "rollup-plugin-copy";
export default {
input: "select.ts",
output: [
{
file: "dist/select.js",
format: "iife",
name: "bootstrap5",
globals: {
bootstrap: "bootstrap",
},
sourcemap: true,
},
{
file: "dist/select.cjs",
format: "cjs",
sourcemap: true,
},
{
file: "dist/select.mjs",
format: "es",
sourcemap: true,
},
],
external: ["bootstrap"],
plugins: [
cleandir("dist"),
typescript(),
terser(),
copy({
targets: [
{
src: ["dist/select.js", "dist/select.js.map"],
dest: "docs",
},
],
}),
],
};