-
Notifications
You must be signed in to change notification settings - Fork 12k
ctorParameters not stripped from BrowserPlatformLocation and TestabilityRegistry in prod builds #15194
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
Comments
Hi @IgorMinar,
This logic has been present since the introduction of Build Optimizer angular/devkit@3097901#diff-98ef76947c50df9f53c7f56d716cb64cR5 I don't really have enough info to know why this was the case. Maybe @filipesilva since he authored the original commit remembers the reason why that list was introduced. |
I don't actually remember either. The current whitelist angular-cli/packages/angular_devkit/build_optimizer/src/transforms/scrub-file.ts Lines 25 to 31 in 607e6f7
is retained from the precursor to Build Optimizer, which was purify+ngo . @alxhub according to git blame you were the one that added the whitelist. Do you know if it's still needed? @kara and @IgorMinar were involved in the creation of ngo and might know as well. Even if we don't remove it we should add context in a comment since it seems no one knows why it's important now. |
unverified theory: all of these are defined as part of the platform injector which is the top most injector in an app and that injector used to have special requirements. We need to evaluate if that's still the case today. |
Removing it doesn't seem to break AIO using VE or Ivy, and it doesn't change the bundle size either. |
Asked @alxhub and he said
So I think I'll remove the whitelist. I'll also remove the symbol based mechanism for identifying if the file is Angular Core. It only works for FESM and we've since added a flag that the caller can set that does the same. It's used on the webpack plugin, which has information about the package. |
#15217 should implement the work needed on the CLI side. |
…gular classes This whitelist a leftover from older Angular versions and isn't necessary anymore. Fix angular#15194
…gular classes This whitelist a leftover from older Angular versions and isn't necessary anymore. Fix #15194
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. |
🐞 Bug report
Command (mark with an
x
)Is this a regression?
Yes, the previous version in which this bug was not present was: ....yes
Description
A clear and concise description of the problem...🔬 Minimal Reproduction
🔥 Exception or Error
If I disable terser mangling, I'll see that ctorParams survived the build optimizer scrub pass on:
and
This happens both with and without Ivy
🌍 Your Environment
Anything else relevant?
The text was updated successfully, but these errors were encountered: