const resolve = require('rollup-plugin-node-resolve'); const ROLLUP_GLOBALS = { 'tslib': 'tslib', // Angular dependencies '@angular/animations': 'ng.animations', '@angular/core': 'ng.core', '@angular/common': 'ng.common', '@angular/forms': 'ng.forms', '@angular/common/http': 'ng.common.http', '@angular/router': 'ng.router', '@angular/platform-browser': 'ng.platformBrowser', '@angular/platform-server': 'ng.platformServer', '@angular/platform-browser-dynamic': 'ng.platformBrowserDynamic', '@angular/platform-browser/animations': 'ng.platformBrowser.animations', '@angular/core/testing': 'ng.core.testing', '@angular/common/testing': 'ng.common.testing', '@angular/common/http/testing': 'ng.common.http.testing', // RxJS dependencies 'rxjs/BehaviorSubject': 'Rx', 'rxjs/ReplaySubject': 'Rx', 'rxjs/Observable': 'Rx', 'rxjs/Subject': 'Rx', 'rxjs/Subscription': 'Rx', 'rxjs/Observer': 'Rx', 'rxjs/Subscriber': 'Rx', 'rxjs/Scheduler': 'Rx', 'rxjs/observable/combineLatest': 'Rx.Observable', 'rxjs/observable/forkJoin': 'Rx.Observable', 'rxjs/observable/fromEvent': 'Rx.Observable', 'rxjs/observable/merge': 'Rx.Observable', 'rxjs/observable/of': 'Rx.Observable', 'rxjs/observable/throw': 'Rx.Observable', 'rxjs/observable/defer': 'Rx.Observable', 'rxjs/observable/fromEventPattern': 'Rx.Observable', 'rxjs/observable/empty': 'Rx.Observable', 'rxjs/operators/debounceTime': 'Rx.operators', 'rxjs/operators/takeUntil': 'Rx.operators', 'rxjs/operators/take': 'Rx.operators', 'rxjs/operators/first': 'Rx.operators', 'rxjs/operators/filter': 'Rx.operators', 'rxjs/operators/map': 'Rx.operators', 'rxjs/operators/tap': 'Rx.operators', 'rxjs/operators/startWith': 'Rx.operators', 'rxjs/operators/auditTime': 'Rx.operators', 'rxjs/operators/switchMap': 'Rx.operators', 'rxjs/operators/switchMapTo': 'Rx.operators', 'rxjs/operators/finalize': 'Rx.operators', 'rxjs/operators/catchError': 'Rx.operators', 'rxjs/operators/share': 'Rx.operators', 'rxjs/operators/delay': 'Rx.operators', 'rxjs/operators/combineLatest': 'Rx.operators', 'rxjs/operators/pairwise': 'Rx.operators', 'rxjs/operators/distinctUntilChanged': 'Rx.operators', 'rxjs/operators/takeWhile': 'Rx.operators', 'rxjs/operators/repeat': 'Rx.operators', // 3rd party dependencies // @nebular dependencies '@nebular/theme': 'nb.theme', '@nebular/auth': 'nb.auth', '@nebular/security': 'nb.security', }; export const ROLLUP_COMMON_CONFIG = { sourceMap: true, rollup: require('rollup'), context: 'this', globals: ROLLUP_GLOBALS, external: Object.keys(ROLLUP_GLOBALS), plugins: [ resolve({ jsnext: true, main: true, }), ], };