npm / ng-packagr
ng-packagr
What changed in ng-packagr 9 to 22, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-30.
49 breaking1 deprecations7 new APIs and options7 performance22 behavior and defaults24 tooling34 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli initng-packagr 2221 changes
Breaking changes 3
The peer dependency is updated to support Angular v22.
Node.js 20 is no longer supported; the minimum supported versions are v22.22.0 and v24.13.1, and Node.js 26 is supported.
TypeScript versions older than 6.0 are no longer supported, while TypeScript 6 is supported as a peer dependency.
Performance 1
Declaration-file tree-shaking is enabled and dts bundling is optimized.
Behavior and default changes 4
Watch invalidation is deferred until the running build completes.
Reverts parallel entry point scheduling.
Legal and annotation comments are preserved while other comments are removed from JavaScript bundles.
Supported browsers are transformed to targets using the lowest version.
Tooling 2
Spinners are disabled during parallel entry-point builds.
Rolldown replaces Rollup in ng-packagr.
Fixes and other changes 11
Rebasing url() works with hyphen-namespaced Sass variables.
Every url() in a Sass stylesheet is rebased.
TS6059 is ignored on Angular compiler generated shims.
A parallel index.ts is rejected only when it is imported.
Schema validation errors now name the unknown option.
Logs the correct diagnostics array for warnings.
Prevents concurrent compilation and stale cache results.
Generates specific .npmignore entries for secondary entry-point package.json files, fixing how those files are handled in the package.
The angularDiagnosticCache is invalidated when HTML files change.
DTS sourcemaps now point to the original TypeScript files.
Package.json files with export subpaths are now handled.
ng-packagr 218 changes
Breaking changes 2
The Less javascriptEnabled option is no longer supported; projects using inline JavaScript in Less files need to refactor their stylesheets.
TypeScript versions older than 5.9 are no longer supported.
New APIs and options 1
Adds importAttributesKey: 'with' to Rollup output options.
Behavior and default changes 1
Generated package.json files now default type to module.
Tooling 2
Adds support for Angular version 21.
Types are now written in the types directory.
Fixes and other changes 2
Rollup now resolves imports with TypeScript extensions.
Correctly identifies external modules.
ng-packagr 2014 changes
Breaking changes 4
The TypeScript
compositeoption is disabled with the Angular compiler.Nested CSS in components is prevented.
Node.js v18 and versions 22.0 through 22.10 are no longer supported; minimum supported versions are 20.19, 22.12, and 24.0.
TypeScript versions less than 5.8 are no longer supported.
Performance 2
Reduces memory usage when building multiple entry-points in non-watch mode.
Redundant entry-point builds are prevented in watch mode.
Behavior and default changes 2
Browser support expands to widely available Baseline.
The empty chunk warning is disabled.
Tooling 3
Angular version 20 is supported.
DTS bundles are added for entry-points.
Sass package importers are supported.
Fixes and other changes 3
The exports field is now ordered deterministically.
The
.browserslistrcin a package is now correctly resolved.SCSS resources from nested paths are now correctly resolved.
ng-packagr 196 changes
Breaking changes 1
Removes the unused ESM2022 format from APF.
New APIs and options 1
Adds a sass option.
Behavior and default changes 1
Disables Rollup's hoistTransitiveImports option.
Tooling 1
Overhauls the stylesheet pipeline.
Fixes and other changes 2
Improves cache logic to handle BigInt.
Resolves ESM files correctly on Windows.
ng-packagr 186 changes
Breaking changes 2
Adds support for Angular 17.
Support for Node.js versions below 18.19.1 and 20.11.1 has been removed.
New APIs and options 2
Adds NgPackagrOptions to the public API.
Adds support for polling.
Tooling 1
Adds support for TypeScript 5.4.
Fixes and other changes 1
Fixes incorrect path resolution for entry-points when generating FESM.
ng-packagr 174 changes
Breaking changes 1
TypeScript versions before 5.2 are no longer supported; TypeScript 5.2 is supported.
Behavior and default changes 1
Emits
.tsbuildinfowhen cache mode is enabled.
Fixes and other changes 2
Fixes esbuild's inability to resolve a secondary entry point from a library.
Adds a workaround to terminate workers when ng-packagr is destroyed.
ng-packagr 169 changes
Breaking changes 8
ES2020 is replaced with ES2022 in the Angular Package Format.
ES2022 replaces ES2020 in the Angular Package Format.
FESM2015 is removed from the Angular Package Format.
FESM2020 is replaced with FESM2022 in the Angular Package Format.
FESM2022 replaces FESM2020 in the Angular Package Format.
NGCC integration is removed, so Angular View Engine libraries will no longer work.
Node.js v14 support is removed; Node.js v16 and v18 continue to be officially supported.
TypeScript 4.8 is no longer supported.
Fixes and other changes 1
The destination directory is now always set.
ng-packagr 158 changes
Breaking changes 5
A missing component resource now produces an actionable error.
Support now includes Node.js 18.10.x; versions 14.[15-19].x and 16.[10-12].x are no longer supported.
Support for Stylus has been removed; migrate to another supported CSS preprocessor.
TypeScript declaration diagnostics are now emitted.
TypeScript versions older than 4.8.2 are no longer supported.
Behavior and default changes 1
README.md lookup no longer scans node_modules, including nested node_modules.
Tooling 2
ng-packagr switches to the Sass modern API.
ng-packagr adds support for tailwindcss.
ng-packagr 1412 changes
Breaking changes 4
Node.js v12 support was removed; use Node.js v14.15 or later.
package.json is no longer a valid way to configure ng-packagr; use ng-package.json instead.
Paths are joined instead of resolved.
Support for TypeScript 4.7 and 4.6.2 was added; support for TypeScript 4.4 and 4.5 was removed.
Behavior and default changes 3
More complex assets configurations are supported.
Circular dependency warnings are ignored.
The hardcoded moduleResolution setting was removed.
Tooling 1
Generated output was updated to APF 14.
Fixes and other changes 4
Invalid browsers version ranges were fixed.
An entry file named index.ts no longer causes a recursive export.
index.ts was allowed again as an entry file.
Watch mode was fixed when using the ng-packagr CLI directly.
ng-packagr 1327 changes
Breaking changes 11
The amdId option, used for UMD bundle generation, was removed.
es2015 was replaced with es2020.
Less version 3.5 math behavior is enforced.
Generated JavaScript files use the .mjs extension.
Support for node-sass was removed; sass is used by default to compile SASS and SCSS files.
Conflicting package exports now produce an error.
TypeScript versions prior to 4.4 are no longer supported.
UMD bundles are no longer generated.
The umdId option, used for UMD bundle generation, was removed.
The umdModuleIds option, used for UMD bundle generation, was removed.
Compilation of libraries using View Engine is no longer supported.
New APIs and options 2
Options now allow providing a cache directory and disabling caching.
A stylesheet language can now be specified for inline component styles.
Behavior and default changes 7
Browserslist defaults are set.
FESM generation state is stored on disk.
The es2020 bundle is downleveled to generate FESM2015.
FESMs are regenerated only when ESM has changed.
Ivy partial compilations are enabled by default.
Generated package exports are merged instead of overriding existing exports.
Watch mode now watches only dependent files.
Tooling 5
A WASM-based fallback is supported for the esbuild optimizer.
The node-sass-tilde-importer was replaced with a custom Sass importer.
Node.js version 16 is supported.
Support was added for package.json exports, including node, es2015, esm2020, and es2020 export conditions.
TypeScript configuration errors are reported.
Fixes and other changes 2
Safari browserslist conversion to the esbuild target was improved, and supported browsers are provided to esbuild.
Non-error compiler diagnostics no longer cause a non-zero exit code.
ng-packagr 1212 changes
Breaking changes 4
Bundling of dependencies is removed without replacement.
The project updates to use Node 12 APIs; the notes also state that Node.js 10 will become EOL.
Minified UMD bundles are no longer generated, and UMD bundles are no longer generated during watch mode.
The JSON schema no longer supplies a default value for whitelistedNonPeerDependencies.
Deprecations 1
whitelistedNonPeerDependencies is deprecated in favor of allowedNonPeerDependencies.
Performance 1
Stylesheets are cached and the stylesheet processor is reused to improve stylesheet processing performance.
Behavior and default changes 1
CSS declaration sorting optimizations are disabled.
Tooling 5
Support is added for Angular version 12.
Publishing an Ivy library in partial mode is supported.
JSON configuration files can now contain comments.
postcss-preset-env is added with stage 3 features.
TypeScript 4.2 is supported.
ng-packagr 119 changes
Breaking changes 1
TypeScript 3.9 is no longer supported; upgrade to TypeScript 4.0.
Performance 3
The AJV validator is initialized only once.
A module resolution cache is shared across all entry-points.
Processing is short-circuited across entry-points.
Tooling 2
Angular 11 is supported.
Progress reporting is improved, giving developers clearer feedback during builds.
Fixes and other changes 3
Set semantics are used when computing which entry-points to recompile.
The analysis cache is cleared in watch mode so invalid imports can be detected.
Fixes a Less spawn error on Windows.
ng-packagr 98 changes
Breaking changes 3
Less imports resolve packages in node_modules by default, so remove the deprecated less-plugin-npm-import and omit the leading tilde from import paths.
tslib is added as a peer dependency instead of a dependency, aligning with the Angular framework.
TypeScript versions prior to 3.6.4 are no longer supported; the release adds support for TypeScript 3.6 and 3.7.
New APIs and options 1
The schema now includes the assets option.
Behavior and default changes 1
File copying now ignores
.gitkeep,Thumbs.dband.DS_Store.
Fixes and other changes 3
Fixes the downlevel constructor parameters transformer with tsickle.
Module analysis is more accurate, including handling a module name that is the primary entry point.
NGCC is skipped when the file system is read only.