-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
HMR of CSS doesn't work for previously non-styled elements #15384
Copy link
Copy link
Closed
Labels
- P4: importantViolate documented behavior or significantly impacts performance (priority)Violate documented behavior or significantly impacts performance (priority)6-betaIssues affects the beta of Astro 6Issues affects the beta of Astro 6feat: hmrRelated to HMR (scope)Related to HMR (scope)
Description
Astro Info
Astro v6.0.0-beta.6
Vite v7.3.1
Node v25.3.0
System macOS (arm64)
Package Manager pnpm
Output static
Adapter none
Integrations none
If this issue only occurs in one browser, which browser is a problem?
No response
Describe the Bug
When a new CSS ruleset (selector + styles) is added to the code targeting an element that hasn't been styled before, the HMR doesn't seem to pick it up, and it requires a server restart to get the styles to appear.
What's the expected result?
I expect HMR to update the styles regardless of whether it's a new element being targeted or one that already has styles.
Link to Minimal Reproducible Example
https://stackblitz.com/~/github.com/illright/astro-v6-hmr-repro
Participation
- I am willing to submit a pull request for this issue.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
- P4: importantViolate documented behavior or significantly impacts performance (priority)Violate documented behavior or significantly impacts performance (priority)6-betaIssues affects the beta of Astro 6Issues affects the beta of Astro 6feat: hmrRelated to HMR (scope)Related to HMR (scope)