-
Notifications
You must be signed in to change notification settings - Fork 0
/
rollup.config.js
37 lines (35 loc) · 1.14 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
import rollupPluginSpl from "rollup-plugin-spl";
import fixXMLHttpRequest from "./rollupExtra/fixXMLHttpRequest";
// eslint-disable-next-line no-undef
var custom = process.env.CUSTOM;
// eslint-disable-next-line no-undef
var config = process.env.CONFIG;
export default {
input: 'src/index.js',
output: {
name: 'Kt',
file: (custom || config) ? 'target/ktapi-custom.js' : 'target/ktapi-full.js',
format: 'umd',
globals: {
'jssha': 'jsSHA',
'd3-request': 'd3',
'pusher-js': 'Pusher',
'xmlhttprequest': 'XMLHttpRequest',
'btoa': 'btoa',
'object-assign': 'Object.assign',
'https': 'https',
'url': 'url',
},
},
external: ['jssha', 'd3-request', 'pusher-js', 'xmlhttprequest', 'btoa', 'https', 'url', 'object-assign', ],
plugins: [rollupPluginSpl({
model: "model.json",
config: config ? config : (custom ? false : "fullConfig.json"),
interactive: custom,
autocomplete: {
preference: true,
},
}),
fixXMLHttpRequest(),
],
};