Skip to content

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

Open
@ravijayaramappa

Description

@ravijayaramappa

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 #1860

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions