-
Notifications
You must be signed in to change notification settings - Fork 0
/
rollup.config.mjs
40 lines (38 loc) · 1.02 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
import pkg from "./package.json" with {type: "json"};
import terser from "@rollup/plugin-terser";
let config = {
input: "src/potprox.mjs",
output: {
name: "potprox",
banner: `/*!\n${pkg.name} v${pkg.version}\n${pkg.homepage}\n*/`,
},
plugins: [
terser({
output: {comments: /^!/},
}),
],
};
export default [
{
input: config.input,
output: {file: "dist/potprox.mjs", format: "esm", ...config.output},
},
{
input: config.input,
output: {file: "dist/potprox.min.mjs", format: "esm", ...config.output},
plugins: config.plugins,
},
{
input: config.input,
output: {file: "dist/potprox.js", format: "umd", ...config.output},
},
{
input: config.input,
output: {file: "dist/potprox.min.js", format: "umd", ...config.output},
plugins: config.plugins,
},
{
input: config.input,
output: {file: "dist/potprox.cjs", format: "cjs", ...config.output},
},
];