feat(@schematics/angular): add use-library-builder migration to migrate from ng-packagr - #34232
Open
alan-agius4 wants to merge 1 commit into
Open
alan-agius4 wants to merge 1 commit into
alan-agius4 wants to merge 1 commit into
Conversation
alan-agius4
force-pushed
the
feat/use-library-builder-migration
branch
2 times, most recently
from
October 1, 2026 12:05
f08895d to
8a5e256
Compare
alan-agius4
force-pushed
the
feat/use-library-builder-migration
branch
2 times, most recently
from
October 1, 2026 12:51
dd4e9fb to
c6c9faf
Compare
alan-agius4
marked this pull request as ready for review
October 2, 2026 08:48
There was a problem hiding this comment.
Code Review
This pull request introduces a new migration schematic, use-library-builder, designed to transition Angular library projects from the legacy ng-packagr builder to the new @angular/build:library builder. The migration handles transferring target options, discovering and mapping secondary entry points to package.json exports, and cleaning up obsolete configuration files and dependencies. Feedback on the implementation suggests refactoring a while loop in the directory traversal logic to avoid assignment within the loop condition, which improves code readability and prevents potential linter warnings.
alan-agius4
force-pushed
the
feat/use-library-builder-migration
branch
3 times, most recently
from
October 2, 2026 09:05
a040fd7 to
8ac844b
Compare
…te from ng-packagr Adds an optional migration for v22.3.0 to migrate library projects from ng-packagr to the @angular/build:library builder. The migration: - Discovers and converts primary and secondary entry points into the library package.json exports map. - Migrates assets and style preprocessor options from ng-package.json. - Configures compilationMode: 'full' and declarationMap: true for the development configuration. - Deletes ng-package.json files and removes ngPackage from package.json. - Removes ng-packagr dependency and ensures @angular/build is present when no other ng-packagr targets remain.
alan-agius4
force-pushed
the
feat/use-library-builder-migration
branch
from
October 2, 2026 09:09
8ac844b to
0788bdb
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds an optional migration for v22.3.0 to migrate library projects from
ng-packagrto the@angular/build:librarybuilder.The migration:
package.jsonexportsmap.ng-package.json.compilationMode: 'full'anddeclarationMap: truefor thedevelopmentconfiguration.ng-package.jsonfiles and removesngPackagefrompackage.json.ng-packagrdependency and ensures@angular/buildis present when no otherng-packagrtargets remain.