-
Notifications
You must be signed in to change notification settings - Fork 28
/
rollup.config.js
43 lines (41 loc) · 896 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
43
import babel from "rollup-plugin-babel";
import dts from "rollup-plugin-dts";
const outputName = "tlejs";
export default [
{
input: "src/index.js",
output: [
{
file: `dist/${outputName}.umd.js`,
name: outputName,
globals: {
"satellite.js": "satellite"
},
format: "umd"
},
{
file: `dist/${outputName}.esm.js`,
format: "esm"
},
{
file: `dist/${outputName}.cjs`,
format: "cjs"
}
],
external: ["satellite.js"],
plugins: [
babel({
exclude: "node_modules/**"
})
],
},
{
input: "./src/index.d.ts",
output: [
{ file: `dist/${outputName}.umd.d.ts`, format: 'umd' },
{ file: `dist/${outputName}.esm.d.ts`, format: 'esm' },
{ file: `dist/${outputName}.d.ts`, format: 'cjs' }
],
plugins: [dts()],
}
];