-
Notifications
You must be signed in to change notification settings - Fork 5
/
rollup.config.js
41 lines (39 loc) · 1.01 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
import resolve from "@rollup/plugin-node-resolve";
import commonjs from "@rollup/plugin-commonjs";
import babel from "rollup-plugin-babel";
import pkg from "./package.json";
import license from "rollup-plugin-license";
import cleanup from "rollup-plugin-cleanup";
import { terser } from "rollup-plugin-terser";
let dev = {
input: "src/p5.recorder.js",
output: [
{
name: "p5.Recorder",
file: pkg.module + ".js",
format: "umd",
sourcemap: true,
plugins: [],
},
{
name: "p5.Recorder",
file: pkg.module + ".min.js",
format: "umd",
sourcemap: true,
plugins: [terser()],
},
],
plugins: [
license({
banner:
"Copyright <%= pkg.name %> \nv<%= pkg.version %>\nby <%= pkg.author %>\n<%= new Date().toLocaleDateString() %>",
}),
babel({
exclude: "node_modules/**",
}),
resolve(), // so Rollup can find `ms`
commonjs(), // so Rollup can convert `ms` to an ES module,
cleanup(),
],
};
export default [dev];