-
Notifications
You must be signed in to change notification settings - Fork 5
/
rollup.config.mjs
50 lines (48 loc) · 1.03 KB
/
rollup.config.mjs
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
import babel from "@rollup/plugin-babel";
import nodeResolve from "@rollup/plugin-node-resolve";
// import { terser } from "rollup-plugin-terser";
const extensions = [".js", ".jsx", ".ts", ".tsx"];
export default {
input: "src/index.ts",
plugins: [
nodeResolve({
extensions: [".ts"],
}),
babel({
extensions,
exclude: "node_modules/**",
}),
// Terser issue: https://github.com/terser/terser/issues/828
// terser({
// compress: {
// inline: 3,
// // passes: 3,
// },
// mangle: false,
// toplevel: true,
// module: true,
// output: {
// beautify: true,
// },
// keep_classnames: true,
// }),
],
output: [
{
name: "objectbuffer",
file: "dist/objectbuffer.umd.js",
sourcemap: true,
format: "umd",
},
{
file: "dist/objectbuffer.cjs.js",
sourcemap: true,
format: "cjs",
},
{
file: "dist/objectbuffer.esm.js",
sourcemap: true,
format: "esm",
},
],
};