-
Notifications
You must be signed in to change notification settings - Fork 40
/
rollup.config.js
43 lines (41 loc) · 1.06 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
import {babel} from '@rollup/plugin-babel';
import resolve from '@rollup/plugin-node-resolve';
import commonJS from '@rollup/plugin-commonjs';
import json from '@rollup/plugin-json';
import builtins from 'rollup-plugin-node-builtins';
import globals from 'rollup-plugin-node-globals';
const output = (name, format) => ({
name,
file: `dist/webexSDKComponentAdapter.${format}.js`,
format,
sourcemap: true,
globals: {
rxjs: 'rxjs',
'rxjs/operators': 'rxjs.operators',
webex: 'webex',
'@webex/common': '@webex/common',
},
});
export default [
{
input: 'src/index.js',
output: [
output('UMDWebexSDKComponentAdapter', 'umd'),
output('ESMWebexSDKComponentAdapter', 'esm'),
],
plugins: [
globals(),
builtins(),
json(),
resolve({preferBuiltins: false}),
commonJS({
transformMixedEsModules: true,
}),
babel({
babelHelpers: 'runtime',
plugins: ['@babel/plugin-transform-runtime'],
}),
],
external: ['rxjs', 'rxjs/operators', 'webex', '@webex/common'],
},
];