Repository navigation
Control emitting Ivy class metadata and Angular module scope information - #16694
Conversation
IgorMinar
left a comment
There was a problem hiding this comment.
this still needs tests, but it looks like it's on the right path.
|
@filipesilva can you please also review? thanks |
filipesilva
left a comment
There was a problem hiding this comment.
We should have some transformer tests to make sure this does what we think it should do, and an e2e that verifies the symbols aren't there in a prod build.
We already know the app still works because we have e2e that test optimized apps.
|
Tests and optimizations are the remaining open items for this. I was planning on finishing this up today. |
051c88f to
f029265
Compare
IgorMinar
left a comment
There was a problem hiding this comment.
this looks quite good to me, I left a few more comments.
I also want to address @filipesilva's comments:
and an e2e that verifies the symbols aren't there in a prod build.
yes, if it's typical for us to have e2e tests, can you add one too? Or since this should be the default behavior, we should just extend an existing e2e tests and check for these symbols (assuming that we have an e2e test like this already).
This behaviour begs the question though: are these calls present in js files inside node modules? Should they be removed from there too? What happens to workspace libraries built with Ivy (even though they shouldn't be built with Ivy for production)?
we don't support Ivy code being shipped to npm, so don't worry about it. If someone does it anyway, they'll face all kinds of issues and payload deopts are not going to be high on their list.
f029265 to
77fcfdb
Compare
… module scope This change allows the import eliding capabilities of the plugin to more completely remove the effects of the `setClassMetadata` and `setNgModuleScope` functions. This provides equivalent behavior to the Decorator removal functionality for ViewEngine.
…lass metadata or module scope
77fcfdb to
8ff7440
Compare
|
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 change allows the import eliding capabilities of the plugin to more completely remove the effects of the
setClassMetadataandsetNgModuleScopefunctions. This provides equivalent behavior to the Decorator removal functionality for View Engine. As a result, Angular components are no longer retained in chunks that do not use the component.This corrects the factory code location problem discussed in #16146 (comment).