×
@MartinaKraus11
New Renderer since version 9
Focusing on small bundle size
Together with Bazel up 30% faster compilation time
Angular Apps should be easier to debug
@MartinaKraus11
Angular provides two compilers:
@MartinaKraus11
Ngtsc (Ivy compiler): compiles Ivy-compatible code
@MartinaKraus11
GDE in Angular
Women Techmakers Ambassador
Trainer and Consultant
@MartinaKraus11
@MartinaKraus11
@MartinaKraus11
@MartinaKraus11
The Code that will be compiled with Ivy uses the ngtsc compiler
Libraries, npm modules, other dependencies are already precompiled
incompatible to the way ngtsc compiles Angular code
Angular team provides the compatibility compiler
@MartinaKraus11
@MartinaKraus11
ngcc scans node_modules and produces Ivy-compatible versions of each package
detects the Angular Package Format (APF) and searches for .metadata.json file and the package's entrypoint
creates output directory ngcc_node_modules (default)
@MartinaKraus11
copied
copied
converted
@MartinaKraus11
@MartinaKraus11
Using Libraries
Lib author
@MartinaKraus11
@MartinaKraus11
#1: Error: Failed to compile entry-point <packagename> due to compilation errors: node_modules/<packagename>/bundles/filename.umd.js(1034,34)]
The issue:
ngcc wasn't able to find a proper entrypoint for converting instructions nor able to create wrapper files
@MartinaKraus11
@MartinaKraus11
@MartinaKraus11
@MartinaKraus11
@MartinaKraus11
Libraries can be compiled ahead-of-time and be published as such to NPM, GitHub Packages etc.
@MartinaKraus11
@MartinaKraus11
@MartinaKraus11
https://angular.io/guide/ivy-compatibility
@MartinaKraus11
@MartinaKraus11
Do I need to add EVERYTHING manually?
@MartinaKraus11
@MartinaKraus11
ng-packagr transpiles your libraries to Angular Package Format
>>npm install -D ng-packagr
@MartinaKraus11
Features:
https://github.com/ng-packagr/ng-packagr/blob/master/README.md
@MartinaKraus11
me@martina-kraus.io
@MartinaKraus11
martina-kraus.io
Ping me:
Slides: slides.com/martinakraus/libs-ng-poland