Skip to content

Commit 03d71fd

Browse files
authored
feat: add compatibility with rxjs 6 and angular 6 (#611)
BREAKING CHANGE: The RXJS imports are now optimized for RXJS6. Effectively when using Angular 5 and thus RXJS 5, more code from RXJS may end up in your bundles, leading to a larger bundle size. This DOES NOT affect Angular 6 and RXJS 6. We suggest to upgrade to Angular 6 when possible!
1 parent 4b9b5e9 commit 03d71fd

File tree

5 files changed

+9
-15
lines changed

5 files changed

+9
-15
lines changed

bundle/src/components/snackbar/mdc.snackbar.service.ts

+2-4
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
import { Injectable, Optional, Renderer2, SkipSelf } from '@angular/core';
22
import { getCorrectEventName } from '@material/animation';
33
import { MDCSnackbar, MDCSnackbarFoundation } from '@material/snackbar';
4-
import { Observable } from 'rxjs/Observable';
5-
import { Subject } from 'rxjs/Subject';
6-
import { filter } from 'rxjs/operators/filter';
7-
import { take } from 'rxjs/operators/take';
4+
import { Observable, Subject } from 'rxjs';
5+
import { filter, take } from 'rxjs/operators';
86
import { MdcSnackbarAdapter } from './mdc.snackbar.adapter';
97
import { MdcSnackbarMessage } from './mdc.snackbar.message';
108

bundle/src/components/tabs/mdc.tab.bar.directive.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { AfterContentInit, ContentChild, ContentChildren, EventEmitter, forwardRef, QueryList, Directive, ElementRef,
22
HostBinding, HostListener, Input, OnDestroy, Optional, Output, Renderer2, Self } from '@angular/core';
33
import { NgControl } from '@angular/forms';
4-
import { Subscription } from 'rxjs/Subscription';
4+
import { Subscription } from 'rxjs';
55
import { MDCTabBarFoundation, MDCTabBarScrollerFoundation } from '@material/tabs';
66
import { MdcTabBarAdapter } from './mdc.tab.bar.adapter';
77
import { asBoolean } from '../../utils/value.utils';

bundle/src/components/tabs/mdc.tab.router.directive.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { AfterContentInit, ChangeDetectorRef, ContentChild, ContentChildren, EventEmitter, forwardRef, QueryList, Directive, ElementRef,
22
HostBinding, HostListener, Input, OnChanges, OnDestroy, Optional, Output, Renderer2, Self } from '@angular/core';
3-
import { Subject } from 'rxjs/Subject';
4-
import { takeUntil } from 'rxjs/operators/takeUntil';
3+
import { Subject } from 'rxjs';
4+
import { takeUntil } from 'rxjs/operators';
55
import { NgControl } from '@angular/forms';
66
import { NavigationEnd, Router, RouterLink, RouterLinkWithHref } from '@angular/router';
77
import { MDCTabFoundation } from '@material/tabs';

bundle/src/components/utility/router.active.detector.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { ChangeDetectorRef, QueryList } from '@angular/core';
2-
import { Subject } from 'rxjs/Subject';
3-
import { takeUntil } from 'rxjs/operators/takeUntil';
2+
import { Subject } from 'rxjs';
3+
import { takeUntil } from 'rxjs/operators';
44
import { NavigationEnd, Router, RouterLink, RouterLinkWithHref } from '@angular/router';
55

66
/**

bundle/tools/ngbundler/index.ts

+2-6
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,8 @@ const globals = {
2929
'@material/textfield/icon': 'mdc.textfield',
3030
'@material/toolbar': 'mdc.toolbar',
3131
'@material/tabs': 'mdc.tabs',
32-
'rxjs/Observable': 'Rx',
33-
'rxjs/Subject': 'Rx',
34-
'rxjs/Subscription': 'Rx',
35-
'rxjs/operators/filter': 'Rx',
36-
'rxjs/operators/take': 'Rx',
37-
'rxjs/operators/takeUntil': 'Rx',
32+
'rxjs': 'rxjs',
33+
'rxjs/operators': 'rxjs.operators',
3834
'tslib': 'tslib'
3935
};
4036

0 commit comments

Comments
 (0)