-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathrollup.config.js
33 lines (33 loc) · 864 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
import resolve from "@rollup/plugin-node-resolve";
import commonjs from "@rollup/plugin-commonjs";
import { terser } from "rollup-plugin-terser";
import json from "@rollup/plugin-json";
import rollupExternalModules from "rollup-external-modules";
const myterserplugin = terser({
//sourcemap: true,
toplevel: true,
output: {
comments: !1,
ascii_only: !0,
},
compress: {
drop_console: true,
drop_debugger: true,
pure_funcs: ["console.log"],
},
mangle: true,
});
export default [
{
external: rollupExternalModules,
input: "./src/index.js",
output: [
{
file: "./dist/index.js",
format: "esm",
sourcemap: true,
},
],
plugins: [json(), myterserplugin, resolve(), commonjs()],
},
];