-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathrollup.config.mjs
44 lines (42 loc) · 1.07 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
import pkg from "./package.json" with {type: "json"};
import terser from "@rollup/plugin-terser";
let config = {
input: "src/lindsvg.mjs",
output: {
name: "lindsvg",
banner: `/*!
${pkg.name} v${pkg.version}
${pkg.homepage}
(c) ${new Date().getUTCFullYear()} ${pkg.author}
*/`,
},
plugins: [
terser({
output: {comments: /^!/},
}),
],
};
export default [
{
input: config.input,
output: {file: "dist/lindsvg.esm.js", format: "esm", ...config.output},
},
{
input: config.input,
output: {file: "dist/lindsvg.esm.min.js", format: "esm", ...config.output},
plugins: config.plugins,
},
{
input: config.input,
output: {file: "dist/lindsvg.js", format: "umd", ...config.output},
},
{
input: config.input,
output: {file: "dist/lindsvg.min.js", format: "umd", ...config.output},
plugins: config.plugins,
},
{
input: config.input,
output: {file: "dist/lindsvg.cjs", format: "cjs", ...config.output},
},
];