-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Enable tree-shaking of more services #18962
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
Conversation
Be aware that mixing |
@PierreDuc this branch is actively avoiding the issue you describe by removing the modules that are already The build failure seems to be related to the testing which on CI is currently targeting the VE (while IIUC |
The ViewEngine failures look legitimate. FYI, you can run tests locally against ViewEngine by passing in |
What is the current plan regarding ViewEngine and Ivy? As a side note, the documentation does not mention |
We support both Ivy and ViewEngine and we'll continue to do so as long as people are able to switch back to ViewEngine. |
does the current version still support Ivy? if not, I would like to work again on this |
We don't support ViewEngine as of version 13. Note that this PR has been pushed very far down in the queue so you might be better off opening a new PR. |
a0ef7d4
to
c6bec19
Compare
It looks like this PR has been forgotten, but I think this is important and is a good step in a direction to make cdk/material more tree-shaking friendly. Is there any plan to merge this PR? |
In order to be tree-shakable, services must be marked as `providedIn` and they must not be explicitly referenced in the `providers` of an `NgModule`.
In order to be tree-shakable, services must be marked as `providedIn` and they must not be explicitly referenced in the `providers` of an `NgModule`.
In order to be tree-shakable, services must be marked as `providedIn` and they must not be explicitly referenced in the `providers` of an `NgModule`.
In order to be tree-shakable, services must be marked as `providedIn` and they must not be explicitly referenced in the `providers` of an `NgModule`.
I rebased the branch on top of the current |
(note that eventually, as we move away from modules thanks to standalone components, tree-shaking issues such as this one might become irrelevant) |
Closing since all of the relevant services are |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
This branch is an attempt to improve tree-shaking of several services.
I started by removing the services that are
providedIn: 'root'
from theproviders
of any module, as that should not be needed and actually prevents them from being removed by tree-shaking.I am investigating whether the remaining services (such as
MatDialog
andOverlay
) need to be provided explicitly or if they can also become tree-shakable.This branch aims at fixing #11581 and #18944