-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathrollup.config.js
38 lines (37 loc) · 987 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
import babel from "rollup-plugin-babel";
import commonjs from "rollup-plugin-commonjs";
import resolve from "rollup-plugin-node-resolve";
import typescript from "rollup-plugin-typescript2";
import { enableDevPlugins } from "./enableDevPlugins";
import { terser } from "rollup-plugin-terser";
export default [
{
input: "lib/index.ts",
output: [
{
file: "dist/index.js",
format: "esm",
sourcemap: false
},
{ file: "dist/lib.cjs.js", format: "cjs" }
],
plugins: [
...enableDevPlugins(),
resolve({
preferBuiltins: true
}),
typescript(),
babel({
plugins: [
"@babel/plugin-proposal-object-rest-spread",
"@babel/plugin-proposal-optional-chaining",
"@babel/plugin-syntax-dynamic-import",
"@babel/plugin-proposal-class-properties"
],
exclude: ["node_modules/**", "lib", "bin"]
}),
commonjs(),
terser()
]
}
];