More Premium Hugo Themes Premium Tailwind Themes

Ng Packagr

Compile and package Angular libraries in Angular Package Format (APF)

Ng Packagr

Compile and package Angular libraries in Angular Package Format (APF)

Author Avatar Theme by ng-packagr
Github Stars Github Stars: 1857
Last Commit Last Commit: Jan 15, 2026 -
First Commit Created: Jun 19, 2023 -
Ng Packagr screenshot

Overview

ng-packagr is a tool that allows you to compile and package Angular libraries in the Angular Package Format (APF). It is used to build distribution-ready npm packages from TypeScript sources.

Features

  • Implements Angular Package Format
  • Bundles your library in FESM2022 format
  • npm package can be consumed by Angular CLI, Webpack, or ESM Bundlers
  • Creates type definitions (.d.ts)
  • Creates scoped and non-scoped packages for publishing to npm registry
  • Inlines Templates and Stylesheets
  • Runs SCSS preprocessor, supporting custom include paths
  • Adds vendor-specific prefixes with autoprefixer and browserslist
  • Embeds assets data with postcss-url

Installation

To install ng-packagr, you can use npm or yarn. Here is an example of how to install it using npm:

npm install ng-packagr --save-dev

Summary

ng-packagr is a powerful tool for compiling and packaging Angular libraries. It follows the Angular Package Format specification and provides a range of features to simplify the process of creating distribution-ready npm packages. With ng-packagr, you can easily bundle your library, create type definitions, and publish your packages to the npm registry.