forked from giovannicandido/angular-spa
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrollup.config.js
50 lines (47 loc) · 1.38 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 nodeResolve from 'rollup-plugin-node-resolve';
export default {
input: 'dist/src/index.js',
plugins: [
nodeResolve({
})
],
output: {
file: 'dist/src/bundles/angular-spa.umd.js',
sourceMap: false,
format: 'umd',
name: 'angularSpa',
globals: {
'@angular/core': 'ng.core',
'@angular/common': 'ng.common',
'@angular/http': 'ng.http',
'@angular/router': 'ng.router',
'angular-http-interceptor': 'angularHttpInterceptor',
'rxjs/Observable': 'Rx',
'rxjs/Subject': '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'
}
},
context: 'this',
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;
}
console.error(warning.message);
},
external: [
'@angular/core',
'@angular/http',
'@angular/common',
'@angular/router',
'angular-http-interceptor',
'rxjs/add/observable/fromPromise',
'rxjs/Observable',
'rxjs/Subject',
'rxjs/add/operator/mergeMap'
]
}