Skip to content

fix(@schematics/angular): keep the default ng-packagr output path in use-library-builder - #34603

Merged
alan-agius4 merged 1 commit into
angular:mainfrom
MeAkib:fix/use-library-builder-default-dest
Oct 30, 2026
Merged

alan-agius4 merged 1 commit into
angular:mainfrom
MeAkib:fix/use-library-builder-default-dest

Conversation

@MeAkib

@MeAkib MeAkib commented Oct 30, 2026

Copy link
Copy Markdown
Contributor

The migration only sets outputPath when the ng-packagr configuration has a dest. Without it, ng-packagr writes to dist within the package directory, while the library builder defaults to dist/<project>, so the migrated library is silently built to a different location.

Set outputPath to the ng-packagr default when dest is not set. A new spec fails without this change.

…use-library-builder

The migration only sets `outputPath` when the ng-packagr configuration has a
`dest`. Without it, ng-packagr writes to `dist` within the package directory,
while the library builder defaults to `dist/<project>`, so the migrated library
is silently built to a different location.

Set `outputPath` to the ng-packagr default when `dest` is not set. A new spec
fails without this change.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the library builder migration schematic to default the output path to 'dist' within the project directory when the dest property is not defined in the ng-package.json configuration. It also adds a corresponding unit test to verify this behavior. There are no review comments, and I have no additional feedback to provide.

@alan-agius4 alan-agius4 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@alan-agius4 alan-agius4 added target: patch This PR is targeted for the next patch release action: merge The PR is ready for merge by the caretaker target: minor This PR is targeted for the next minor release and removed target: patch This PR is targeted for the next patch release labels Oct 30, 2026
@alan-agius4
alan-agius4 merged commit 512bb90 into angular:main Oct 30, 2026
42 of 43 checks passed
@alan-agius4

Copy link
Copy Markdown
Collaborator

This PR was merged into the repository. The changes were merged into the following branches:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

action: merge The PR is ready for merge by the caretaker area: @schematics/angular target: minor This PR is targeted for the next minor release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants