angular-react
angular-react copied to clipboard
Support AOT compile component indivdually
This PR do two things:
- Support AOT can compile single component if is imported individually
- Upgrade
ng-packagrbecause current version doesn't support. - Add
ng-package.jsonfile in each component folder to indicate this is an entry - Change import way of files under
@angular-react/fabirc, becauseng-packagrforbid import files that is not under root dir, so need to import as third-party dependency - Change import way of
office-ui-fabric-reactto only import single component fromoffice-ui-fabric-react
- Upgrade
- Shorten the path of
@angular-react/fabric/src/lib/componentsto@angular-react/fabric/lib/componentsto make path cleaner
Recently, I'm working on apply this microsoft/angular-react to our project. But I find that if I just want to import single component in order to make sure the bundle size would not increase too much, but there is error when enable AOT compile for Production environment because currently this library did not generate *.metadata.json for each component.
New version of ng-packagr has supported to generate *.metadata.json for each component. So I upgrade it to v5.7.1, then apply it to Pivot and it works.
Now you can import this single component by: import { FabPivotModule } from '@angular-react/fabric/lib/components/pivot';