fix(material/core): reduce the number of module resolutions required for the legacy theming bundle #22687
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Currently the legacy
material/theming
bundle is set up to forward a few top-level.import
files. The problem is that those files have been auto-generated to be backwards-compatible even for deep imports which means that they have a lot of overlapping@forward
and@import
statements. This results in a significant increase in build times for consumers still using the old bundle.These changes address the issue by introducing new shallower
*-legacy-index.scss
files which only export the APIs from the specific package and which in turn are re-exported through the top-levelmaterial/theming
file. The change appears to cut the down the production build time on material.angular.io before the @use migration by more than 60%.Fixes #22676.