forked from daybrush/moveable
-
Notifications
You must be signed in to change notification settings - Fork 0
/
rollup.config.js
49 lines (46 loc) · 1.17 KB
/
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
43
44
45
46
47
48
49
import builder from "@daybrush/builder";
import preact from "rollup-plugin-preact";
const preactPlugin = preact({
// usePreactCompat2: true,
noPropTypes: true,
resolvePreactCompat: true,
});
const external = {
"@egjs/component": "@egjs/component",
"@daybrush/utils": "@daybrush/utils",
"@daybrush/drag": "@daybrush/drag",
"framework-utils": "framework-utils",
"@egjs/agent": "eg.Agent",
"@egjs/children-differ": "eg.ChildrenDiffer",
};
export default builder([
{
name: "Moveable",
input: "src/index.umd.ts",
output: "./dist/moveable.js",
plugins: [preactPlugin],
},
{
name: "Moveable",
input: "src/index.umd.ts",
output: "./dist/moveable.min.js",
plugins: [preactPlugin],
uglify: true,
},
{
input: "src/index.esm.ts",
output: "./dist/moveable.esm.js",
exports: "named",
format: "es",
plugins: [preactPlugin],
external,
},
{
input: "src/index.umd.ts",
output: "./dist/moveable.cjs.js",
exports: "default",
format: "cjs",
plugins: [preactPlugin],
external,
},
]);