Skip to content

Instantly share code, notes, and snippets.

@thiamsantos
Forked from ericelliott/rxjs-patching.js
Created December 13, 2016 21:25
Show Gist options
  • Save thiamsantos/6f262d878a89b5cdd6f75f8547f3e7f1 to your computer and use it in GitHub Desktop.
Save thiamsantos/6f262d878a89b5cdd6f75f8547f3e7f1 to your computer and use it in GitHub Desktop.
Reduce bundle size with RxJS patching
import { Observable } from 'rxjs/Observable';
// then patch import only needed operators:
import 'rxjs/add/operator/map';
import 'rxjs/add/observable/from';
const foo = Observable.from([1, 2, 3]);
foo.map(x => x * 2).subscribe(n => console.log(n));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment