salesforce / lwc

⚡️ LWC - A Blazing Fast, Enterprise-Grade Web Components Foundation
https://lwc.dev
Other
1.64k stars 392 forks source link

[HMR] CSS: Provide a mechanism to register stylesheets #1887

Open ravijayaramappa opened 4 years ago

ravijayaramappa commented 4 years ago

Is your feature request related to a problem? Please describe. Adding support for Hot Module Resolution(HMR) requires a registration process to hot swap component constructor, template and stylesheet. Today we have a mechanism to register a template and component constructor as trusted. This feature request is to provide a similar registration mechanism for StyleSheets.

When a new style is being registered for swap, it can be validated before being used.

Describe the solution you'd like Provide a registerStyleSheet() API from 'lwc' module

Additional context This requirement originated while reviewing this PR https://github.com/salesforce/lwc/pull/1860

nolanlawson commented 1 year ago

Fixed by #3443

nolanlawson commented 7 months ago

This was merged and then reverted. It would be fixed by #3477.