Astro Info
Astro v5.14.3
Vite v6.3.6
Node v22.14.0
System macOS (arm64)
Package Manager npm
Output static
Adapter @astrojs/node (v9.4.4)
If this issue only occurs in one browser, which browser is a problem?
Chrome
Describe the Bug
When modifying .scss files during development, Astro triggers a full page reload instead of hot module replacement (HMR). This disrupts the development workflow as it loses current state and scroll position.
If I write:
if (import.meta.hot) {
import.meta.hot.on('vite:beforeFullReload', (payload) => {
console.log(payload);
})
}
After save a .scss file, this log appears:
What's the expected result?
Changes to .scss files should trigger CSS-only hot updates without a full page reload.
Link to Minimal Reproducible Example
https://stackblitz.com/edit/github-f9txtpa5?file=src%2Fcomponents%2FExample.module.scss
Participation
Astro Info
If this issue only occurs in one browser, which browser is a problem?
Chrome
Describe the Bug
When modifying
.scssfiles during development, Astro triggers a full page reload instead of hot module replacement (HMR). This disrupts the development workflow as it loses current state and scroll position.If I write:
After save a
.scssfile, this log appears:What's the expected result?
Changes to
.scssfiles should trigger CSS-only hot updates without a full page reload.Link to Minimal Reproducible Example
https://stackblitz.com/edit/github-f9txtpa5?file=src%2Fcomponents%2FExample.module.scss
Participation