Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(): use secondary entry points for @angular/material and rxjs #1019

Merged
merged 2 commits into from
Dec 8, 2017

Conversation

emoralesb05
Copy link
Contributor

@emoralesb05 emoralesb05 commented Dec 8, 2017

we need to cherry pick the modules we use as dependencies in covalent so we dont implicitly load everything that comes in those packages when we only need a few things.. thus reducing bundle sizes.

this is needed so we dont load all the @angular/material packages when we only need a few (same for rxjs)

e.g.

import { MatCardModule, MatInputModule } from '@angular/material';
import { map, startsWith } from 'rxjs/operators';

would be

import { MatCardModule } from '@angular/material/card';
import { MatInputModule } from '@angular/material/input';

import { map } from 'rxjs/operators/map';
import { startsWith } from 'rxjs/operators/startsWith';

What's included?

  • Lint rule so we cant import directly from rxjs, rxjs/operators, @angular/cdk and @angular/material
  • Cherry pick only the modules we need

Test Steps

  • npm run serve
  • See everything working the same way

General Tests for Every PR

  • npm run serve:prod still works.
  • npm run lint passes.
  • npm test passes and code coverage is not lower.
  • npm run build still works.

closes #1001

…we can cherry pick modules

this is needed so we dont load all the @angular/material packages when we only need a few (same for rxjs)
@aciccarello
Copy link
Contributor

Related to angular/components#6998

@emoralesb05 emoralesb05 merged commit 261d40d into develop Dec 8, 2017
@emoralesb05 emoralesb05 deleted the feature/cherry-pick-material branch December 8, 2017 22:28
kriswinbush pushed a commit to kriswinbush/covalent that referenced this pull request Feb 20, 2020
…we can cherry pick modules (Teradata#1019)

this is needed so we dont load all the @angular/material packages when we only need a few (same for rxjs)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unused @angular/material scripts being pulled to application bundle
2 participants