Skip to content
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

fix(hmr): reload CSS when inlined SVG is changed #18972

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

sapphi-red
Copy link
Member

Description

fixes #18963

This PR fixes #18963 by registering all referenced assets as a dependency of CSS files.

@sapphi-red sapphi-red added feat: hmr p4-important Violate documented behavior or significantly improves performance (priority) labels Dec 16, 2024
Comment on lines +796 to 799
// TODO
if (
!isCSSRequest(node.url) &&
[...node.importers].every((i) => isCSSRequest(i.url))
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With this PR, changing any file referenced by CSS will cause a full reload because of this code (slightly related: this code is the cause of #9512). That'll probably degrade the UX quite a bit.

For this reason, I'm considering to only handle inlined SVGs for now (in a different PR).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat: css feat: hmr p4-important Violate documented behavior or significantly improves performance (priority)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

inlined SVG is not updated unless the server is restarted
1 participant