Skip to content

fix(@angular/build): resolve style include paths relative to ng-package.json in unit-test builder#32674

Merged
alan-agius4 merged 1 commit intoangular:mainfrom
alan-agius4:unit-test-builder-lib-style-paths
Mar 4, 2026
Merged

fix(@angular/build): resolve style include paths relative to ng-package.json in unit-test builder#32674
alan-agius4 merged 1 commit intoangular:mainfrom
alan-agius4:unit-test-builder-lib-style-paths

Conversation

@alan-agius4
Copy link
Collaborator

When using the unit-test builder with an ng-packagr build target, the styleIncludePaths from ng-package.json were being used relative to the workspace root instead of the library's directory. This caused build failures when libraries specified style include paths.

This change ensures that these paths are correctly resolved relative to the directory containing ng-package.json.

…age.json` in unit-test builder

When using the `unit-test` builder with an `ng-packagr` build target, the `styleIncludePaths` from `ng-package.json` were being used relative to the workspace root instead of the library's directory. This caused build failures when libraries specified style include paths.

This change ensures that these paths are correctly resolved relative to the directory containing `ng-package.json`.
@alan-agius4 alan-agius4 requested a review from clydin March 4, 2026 09:16
@alan-agius4 alan-agius4 added action: review The PR is still awaiting reviews from at least one requested reviewer target: patch This PR is targeted for the next patch release labels Mar 4, 2026
Copy link

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

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 effectively resolves an issue where styleIncludePaths were not correctly resolved relative to the ng-package.json file within the unit-test builder. The changes correctly implement path resolution, which is crucial for libraries specifying style include paths. The e2e test updates are a good addition to verify this fix, though some minor adjustments are needed for the test setup to function as intended.

@alan-agius4 alan-agius4 added action: merge The PR is ready for merge by the caretaker and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Mar 4, 2026
@alan-agius4 alan-agius4 merged commit ac065ad into angular:main Mar 4, 2026
38 checks passed
@alan-agius4 alan-agius4 deleted the unit-test-builder-lib-style-paths branch March 4, 2026 13:29
@alan-agius4
Copy link
Collaborator Author

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: @angular/build target: patch This PR is targeted for the next patch release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants