Skip to content

Commit

Permalink
build: fix rollup globals for examples package (#5611)
Browse files Browse the repository at this point in the history
Recently the rollup globals have been changed because the operators are no longer applied to the prototype (using `/add/` imports).

This now causes some warnigns and invalid id's in the bundles of the Material examples because those still use the `/add/` imports in some examples.
  • Loading branch information
devversion authored and mmalerba committed Jul 9, 2017
1 parent 5f9a64b commit 077ebf6
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion tools/package-tools/rollup-helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const ROLLUP_GLOBALS = {
'@angular/material': 'ng.material',
'@angular/cdk': 'ng.cdk',

// Rxjs dependencies
// RxJS dependencies
'rxjs/BehaviorSubject': 'Rx',
'rxjs/Observable': 'Rx',
'rxjs/Subject': 'Rx',
Expand All @@ -49,6 +49,14 @@ const ROLLUP_GLOBALS = {
'rxjs/operator/switchMap': 'Rx.Observable.prototype',
'rxjs/operator/takeUntil': 'Rx.Observable.prototype',
'rxjs/operator/toPromise': 'Rx.Observable.prototype',

// RxJS imports for the examples package
'rxjs/add/observable/merge': 'Rx.Observable',
'rxjs/add/observable/fromEvent': 'Rx.Observable',
'rxjs/add/operator/startWith': 'Rx.Observable.prototype',
'rxjs/add/operator/map': 'Rx.Observable.prototype',
'rxjs/add/operator/debounceTime': 'Rx.Observable.prototype',
'rxjs/add/operator/distinctUntilChanged': 'Rx.Observable.prototype',
};

export type BundleConfig = {
Expand Down

0 comments on commit 077ebf6

Please sign in to comment.