-
Notifications
You must be signed in to change notification settings - Fork 48
/
Copy pathrollup.config.js
58 lines (53 loc) · 1.31 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
50
51
52
53
54
55
56
57
58
import builder from "@daybrush/builder";
import compat from "rollup-plugin-react-compat";
const reactCompat = compat({
useCroact: true,
aliasModules: {
"@scena/react-guides": "croact-guides",
},
});
const resolveReactCompat = compat({
useCroact: true,
resolveCompat: true,
});
const external = {
"croact": "croact",
"croact-guides": "croact-guides",
"@egjs/component": "@egjs/component",
"@daybrush/utils": "@daybrush/utils",
"gesto": "gesto",
"framework-utils": "framework-utils",
"@egjs/agent": "eg.Agent",
"@egjs/children-differ": "eg.ChildrenDiffer",
};
export default builder([
{
name: "Guides",
input: "src/index.umd.ts",
output: "./dist/guides.js",
plugins: [resolveReactCompat],
},
{
name: "Guides",
input: "src/index.umd.ts",
output: "./dist/guides.min.js",
plugins: [resolveReactCompat],
uglify: true,
},
{
input: "src/index.esm.ts",
output: "./dist/guides.esm.js",
exports: "named",
format: "es",
plugins: [reactCompat],
external,
},
{
input: "src/index.cjs.ts",
output: "./dist/guides.cjs.js",
exports: "named",
format: "cjs",
plugins: [reactCompat],
external,
},
]);