forked from grimmdude/MidiPlayerJS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
rollup.config.js
49 lines (48 loc) · 1.03 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
42
43
44
45
46
47
48
49
import babel from "@rollup/plugin-babel";
import replace from "@rollup/plugin-replace";
export default [
{
input: "src/index.js",
output: [
{
file: "browser/midiplayer.js",
format: "iife",
name: "MidiPlayer",
},
{
file: "build/index.browser.js",
format: "es",
name: "MidiPlayer",
},
],
plugins: [
replace({
"process.browser": true,
"preventAssignment": true
}),
babel({
exclude: "node_modules/**", // only transpile our source code
plugins: ["@babel/plugin-transform-destructuring"],
}),
],
},
{
input: "src/index.js",
output: [
{
file: "build/index.js",
format: "cjs",
},
],
plugins: [
replace({
"process.browser": false,
"preventAssignment": true
}),
babel({
exclude: "node_modules/**", // only transpile our source code
plugins: ["@babel/plugin-transform-destructuring"],
}),
],
},
];