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

feat(bazel): allow for custom conditions to be set in ng_package targets #43764

Conversation

@devversion
Copy link
Member

@devversion devversion commented Oct 7, 2021

The APF v13 ng_package rule will generate the exports field if not
set. Currently it allows for additional subpath entries to be configured
manually. The packager does not allow for custom conditions in subpath
exports which are auto-generated though.

This is sometimes useful and necessary though. e.g. in Angular Material,
we also need to expose the index Sass file through a sass conditional
that the Webpack Sass loader will pick up. For this, the packager needs
to support manual additional conditions (as long as they do not
conflict).

Note: This should not fall under a feature for feature-freeze since this is
internal code only necessary for our own tooling across Angular.

…rgets

The APF v13 `ng_package` rule will generate the `exports` field if not
set. Currently it allows for additional subpath entries to be configured
manually. The packager does not allow for custom conditions in subpath
exports which are auto-generated.

This is sometimes useful and necessary though. e.g. in Angular Material,
we also need to expose the index Sass file through a `sass` conditional
that the Webpack Sass loader will pick up. For this, the packager needs
to support manual additional conditions (as long as they do not
conflict).
@google-cla google-cla bot added the cla: yes label Oct 7, 2021
@ngbot ngbot bot added this to the Backlog milestone Oct 7, 2021
@ngbot ngbot bot added this to the Backlog milestone Oct 7, 2021
alxhub
alxhub approved these changes Oct 7, 2021
clydin
clydin approved these changes Oct 7, 2021
alxhub
alxhub approved these changes Oct 7, 2021
Copy link
Contributor

@alxhub alxhub left a comment

Reviewed-for: global-approvers

@atscott atscott closed this in e0667ef Oct 7, 2021
atscott added a commit that referenced this issue Oct 7, 2021
…rgets (#43764)

The APF v13 `ng_package` rule will generate the `exports` field if not
set. Currently it allows for additional subpath entries to be configured
manually. The packager does not allow for custom conditions in subpath
exports which are auto-generated.

This is sometimes useful and necessary though. e.g. in Angular Material,
we also need to expose the index Sass file through a `sass` conditional
that the Webpack Sass loader will pick up. For this, the packager needs
to support manual additional conditions (as long as they do not
conflict).

PR Close #43764
@angular-automatic-lock-bot
Copy link

@angular-automatic-lock-bot angular-automatic-lock-bot bot commented Nov 7, 2021

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Nov 7, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants