forked from algolia/angular-instantsearch
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrollup.config.umd.js
50 lines (48 loc) · 1.22 KB
/
rollup.config.umd.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
50
/* eslint no-console: 0 */
/* eslint import/no-commonjs: 0 */
import replace from 'rollup-plugin-replace';
import { version } from './package.json';
export default {
input: 'dist/index.js',
name: 'ng.instantsearch',
sourcemap: true,
external: [
'@angular/core',
'@angular/common',
'@angular/common/http',
'instantsearch.js/es',
'instantsearch.js/es/connectors',
'algoliasearch/index',
'querystring-es3/encode',
'lodash-es',
'nouislider',
],
globals: {
'@angular/core': 'ng.core',
'@angular/common': 'ng.common',
'rxjs/Observable': 'Rx',
'rxjs/ReplaySubject': 'Rx',
'rxjs/add/operator/map': 'Rx.Observable.prototype',
'rxjs/add/operator/mergeMap': 'Rx.Observable.prototype',
'rxjs/add/observable/fromEvent': 'Rx.Observable',
'rxjs/add/observable/of': 'Rx.Observable',
},
output: {
format: 'umd',
file: 'dist/bundles/angular-instantsearch.umd.js',
},
plugins: [
replace({
'process.env.VERSION': JSON.stringify(version),
}),
],
onwarn(warning) {
// Skip certain warnings
if (
warning.code !== 'THIS_IS_UNDEFINED' &&
warning.code !== 'MISSING_GLOBAL_NAME'
) {
console.warn(warning.message);
}
},
};