0Pricing
Angular Academy · Lesson

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

  1. Creating a Library with ng generate
  2. Public API and Entry Points
  3. Building with ng-packagr
  4. Publishing to npm
← Back to Angular Academy