Here are the top tips for making smaller bundles:
- Don't import
MaterialModule
, instead pull in any components that you need directly such asMdButtonModule
orMdInputModule
. - Don't import all of
rxjs
, instead import Observables such asimport { Observable} from 'rxjs/Observable';
and then add any of the operators you need manuallyimport 'rxjs/add/operator/map';
- Lazy load every route in your application
- Use AOT
Doing this, my hope is that your application's critical path bundles should be 100kb or less when gzipped.