forked from webex/webex-js-sdk
-
Notifications
You must be signed in to change notification settings - Fork 1
/
rollup.config.js
44 lines (42 loc) · 1.29 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
/* eslint-disable require-jsdoc */
import cleaner from 'rollup-plugin-cleaner';
import json from 'rollup-plugin-json';
import resolve from 'rollup-plugin-node-resolve';
import commonjs from 'rollup-plugin-commonjs';
import {terser} from 'rollup-plugin-terser';
import globals from 'rollup-plugin-node-globals';
import builtins from 'rollup-plugin-node-builtins';
import license from 'rollup-plugin-license';
import {version} from './packages/node_modules/webex/package.json';
export default function ({versionNumber}) {
return {
input: `${__dirname}/packages/node_modules/webex/browser.js`,
output: {
name: 'Webex',
file: `${__dirname}/packages/node_modules/webex/umd/webex.min.js`,
format: 'iife', // since this is for the browser only use IIFE instead of UMD
sourceMap: true
},
plugins: [
cleaner({
targets: [`${__dirname}/packages/node_modules/webex/umd/`]
}),
json({
include: ['packages/node_modules/**', 'node_modules/**']
}),
resolve({
jsnext: true,
browser: true,
preferBuiltins: true
}),
commonjs(),
globals(),
builtins(),
terser(),
license({
sourceMap: true,
banner: `/*! Cisco Spark SDK v${versionNumber || version} */`
})
]
};
}