-
-
Notifications
You must be signed in to change notification settings - Fork 631
/
Copy pathrollup.config.js
55 lines (52 loc) · 1.52 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
const builder = require("@daybrush/builder");
const preact = require("rollup-plugin-preact");
const defaultOptions = {
sourcemap: false,
tsconfig: "tsconfig.build.json",
typescript2: true,
external: {
"@daybrush/utils": "utils",
"gesto": "Gesto",
"preact": "preact",
"preact/compat": "preact/compat",
"preact-compat": "preact-compat",
"framework-utils": "framework-utils",
"preact-css-styled": "preact-css-styled",
"@egjs/agent": "eg.Agent",
"@egjs/children-differ": "eg.ChildrenDiffer",
"@egjs/list-differ": "eg.ListDiffer",
"@moveable/matrix": "@moveable/matrix",
"@scena/dragscroll": "@scena/dragscroll",
"css-to-mat": "css-to-mat",
"overlap-area": "overlap-area",
"@scena/matrix": "@scena/matrix",
},
exports: "named",
plugins: [
preact({
noPropTypes: false,
noEnv: false,
noReactIs: false,
usePreactX: true,
// resolvePreactCompat: true,
aliasModules: {
"react-css-styled": "preact-css-styled",
},
}),
],
};
module.exports = builder([
{
...defaultOptions,
input: "src/preact-moveable/Moveable.ts",
output: "./dist/moveable.esm.js",
format: "es",
},
{
...defaultOptions,
input: "src/preact-moveable/Moveable.ts",
output: "./dist/moveable.cjs.js",
format: "cjs",
exports: "default",
},
]);