-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrollup.config.js
42 lines (41 loc) · 998 Bytes
/
rollup.config.js
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
const path = require("path");
const typescript = require("@rollup/plugin-typescript");
const terser = require("@rollup/plugin-terser").default;
module.exports = [
{
input: path.resolve(__dirname, "src/index.ts"),
output: {
file: path.resolve(__dirname, "dist/main/index.js"),
format: "umd",
name: "Evt",
sourcemap: true,
},
plugins: [
typescript({
tsconfig: path.resolve(__dirname, "tsconfig.json"),
}),
terser(),
],
},
{
input: path.resolve(__dirname, "src/index.ts"),
output: {
file: path.resolve(__dirname, "dist/main/index.mjs"),
format: "esm",
sourcemap: true,
},
plugins: [
typescript({
tsconfig: path.resolve(__dirname, "tsconfig.json"),
}),
],
},
{
input: path.resolve(__dirname, "scripts/evt-autogen.js"),
output: {
file: path.resolve(__dirname, "dist/scripts/evt-autogen"),
format: "cjs",
},
plugins: [terser()],
},
];