Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(angular): fix component export logic to handle internal modules and secondary entry points #10517

Merged
merged 1 commit into from May 31, 2022

Conversation

leosvelperez
Copy link
Member

Current Behavior

When creating a component in a library using the @nrwl/angular:component generator and passing export=true, the component is exported from the corresponding NgModule and from the library's entry point file. This is not entirely correct. If the component being created belongs to an internal module of the library, it shouldn't be exported from the library's entry point.

Likewise, trying to create a component with export=true in a library's secondary entry points errors.

Expected Behavior

A component should only be exported in the library's entry point when the module it belongs to is also exported.
We should be able to create components in a library's secondary entry point.

Related Issue(s)

Fixes #

@leosvelperez leosvelperez requested a review from Coly010 May 30, 2022 14:20
@leosvelperez leosvelperez self-assigned this May 30, 2022
@vercel
Copy link

vercel bot commented May 30, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
nx-dev ✅ Ready (Inspect) Visit Preview May 31, 2022 at 9:36AM (UTC)

Copy link
Contributor

@Coly010 Coly010 left a comment

Choose a reason for hiding this comment

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

LGTM!
Left one small question :)

@leosvelperez leosvelperez merged commit 2b1591d into nrwl:master May 31, 2022
@leosvelperez leosvelperez deleted the angular/fix-component-export branch May 31, 2022 10:09
@github-actions
Copy link

This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 18, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants