Building with ng-packagr
Produce the Angular Package Format output.
Libraries Need a Special Build
You cannot publish raw TypeScript and templates; consumers expect compiled, standardized output. Angular libraries build to the Angular Package Format (APF) using ng-packagr, the tool the CLI uses under the hood.
The Angular Package Format
APF is the official structure for distributable Angular libraries: optimized ES modules, type definitions, and metadata laid out so any Angular app can consume and tree-shake the library reliably.
All lessons in this course
- Creating a Library with ng generate
- Public API and Entry Points
- Building with ng-packagr
- Publishing to npm