-
Notifications
You must be signed in to change notification settings - Fork 66
/
rollup.config.js
38 lines (30 loc) · 953 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
// Rollup config to export the correct componation of bundles
import libBundles from './rollup.lib';
import workerBundles from './rollup.worker';
import coreTsBundles from './rollup.core';
import getCoreBundles from './rollup.getcore';
import debuggerBundles from './rollup.debugger';
import benchmarkBundles from './rollup.benchmark';
import ampBundles from './rollup.amp';
import iframeBundles from './rollup.iframe';
let exports = [];
if (!process.env.SKIP_LIB) {
exports = [...getCoreBundles, ...workerBundles, ...libBundles];
// Add TS Bundles
if (process.env.TS) {
exports = [...coreTsBundles, ...exports];
}
}
if (process.env.DEBUGGER) {
exports = [...exports, ...debuggerBundles];
}
if (process.env.BENCHMARK) {
exports = [...exports, ...benchmarkBundles];
}
if (process.env.AMP) {
exports = [...exports, ...ampBundles];
}
if (process.env.IFRAME) {
exports = [...exports, ...iframeBundles];
}
export default exports;