forked from oferh/ng2-completer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
rollup.config.js
50 lines (48 loc) · 1.57 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
45
46
47
48
49
50
import uglify from 'rollup-plugin-uglify';
export default {
entry: 'dist/index.js',
dest: 'dist/ng2-completer.umd.js',
format: 'umd',
treeshake: true,
moduleName: 'ng2Completer',
sourceMap: true,
onwarn: function (warning) {
// Suppress this error message... there are hundreds of them. Angular team says to ignore it.
// https://github.com/rollup/rollup/wiki/Troubleshooting#this-is-undefined
if (warning.code === 'THIS_IS_UNDEFINED')
return;
},
plugins: [
uglify()
],
globals: {
'@angular/core': 'ng.core',
'@angular/common': 'ng.common',
'@angular/compiler': 'ng.compiler',
'@angular/forms': 'ng.forms',
'@angular/http': 'ng.http',
'@angular/platform-browser': 'ng.platformBrowser',
'@angular/platform-browser-dynamic': 'ng.platformBrowserDynamic',
'rxjs/Subject': 'Rx',
'rxjs/observable/PromiseObservable': 'Rx',
'rxjs/operator/toPromise': 'Rx.Observable.prototype',
'rxjs/Observable': 'Rx',
'rxjs/Rx': 'Rx',
'rxjs/add/operator/map': 'Rx.Operator.map',
'rxjs/add/operator/catch': 'Rx.Operator.catch'
},
external: [
'@angular/core',
'@angular/common',
'@angular/compiler',
'@angular/forms',
'@angular/http',
'@angular/platform-browser',
'@angular/platform-browser-dynamic',
'rxjs/Subject',
'rxjs/observable/PromiseObservable',
'rxjs/operator/toPromise',
'rxjs/Observable',
'rxjs/Rx'
]
}