You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
@ng/component endpoint serves the file-level styleUrls to every class in a multi-component file #451
Split out of the #449 review rounds. Pre-existing on main — the style analog of the template defect fixed in #449.
Symptom
In a multi-component file where classes declare different styleUrls, the @ng/component HMR endpoint builds the update module for ANY requested class from the FILE's full styleUrls list (extractComponentUrls is file-level). A class can receive a sibling's styles, or the union of both.
Cause
The endpoint's styles block iterates styleUrls from extractComponentUrls(source, resolvedId) with no per-class filtering. #449 fixed the template half of this block with a per-class templateUrl locator; the styles half still reads file-level data.
Suggested fix
Mirror #449's template repair: add a per-class styleUrls locator on the locateComponentDecorators machinery (locateStylesFieldFor already exists for inline styles), prefer it in the endpoint, and keep the file-level read as the fallback for unparseable decorator shapes.
Activity