Describe the bug
On Windows, editing a file that a Svelte style block depends on through a preprocessor doesn't seem to get picked up/reprocessed in some circumstances (in this case, a postcss plugin injecting shared mixin definitions). You still see an HMR message go by in the terminal for the component, but whatever comes back afterward still looks like it's from before the edit. Only fully restarting the dev server picks up the change.
More notes in the repro repo, but my best guess is DependenciesCache in plugins/preprocess.js is comparing paths that aren't always in the same format when it comes time to handle preprocessors for files changing. Tried the same thing with a plain SCSS @use dependency and couldn't get the same behavior. Perhaps a difference in how Sass or PostCSS report file paths themselves.
Reproduction URL
https://github.com/sbossarte/vps-hmr-repro
Reproduction
npm ci
npm run dev
- Confirm the heading text is red (from
src/mixins.pcss's --label-color mixin).
- Edit
src/mixins.pcss, change red to blue, save
- Expected: the heading turns blue without a page reload.
- Actual (Windows only): the heading stays red. Only restarting the server entirely picks up the change.
Logs
System Info
System:
OS: Windows 11 10.0.26100
CPU: (32) x64 AMD Ryzen 9 9950X3D 16-Core Processor
Memory: 22.66 GB / 61.56 GB
Binaries:
Node: 22.15.0 - F:\Programs\nodejs\node.EXE
npm: 11.6.2 - F:\Programs\nodejs\npm.CMD
Browsers:
Firefox: 147.0.4 - C:\Program Files\Mozilla Firefox\firefox.exe
npmPackages:
@sveltejs/vite-plugin-svelte: ^7.2.0 => 7.2.0
svelte: ^5.0.0 => 5.56.8
vite: ^8.2.1 => 8.2.1
Describe the bug
On Windows, editing a file that a Svelte style block depends on through a preprocessor doesn't seem to get picked up/reprocessed in some circumstances (in this case, a postcss plugin injecting shared mixin definitions). You still see an HMR message go by in the terminal for the component, but whatever comes back afterward still looks like it's from before the edit. Only fully restarting the dev server picks up the change.
More notes in the repro repo, but my best guess is
DependenciesCacheinplugins/preprocess.jsis comparing paths that aren't always in the same format when it comes time to handle preprocessors for files changing. Tried the same thing with a plain SCSS@usedependency and couldn't get the same behavior. Perhaps a difference in how Sass or PostCSS report file paths themselves.Reproduction URL
https://github.com/sbossarte/vps-hmr-repro
Reproduction
npm cinpm run devsrc/mixins.pcss's--label-colormixin).src/mixins.pcss, changeredtoblue, saveLogs
System Info
System: OS: Windows 11 10.0.26100 CPU: (32) x64 AMD Ryzen 9 9950X3D 16-Core Processor Memory: 22.66 GB / 61.56 GB Binaries: Node: 22.15.0 - F:\Programs\nodejs\node.EXE npm: 11.6.2 - F:\Programs\nodejs\npm.CMD Browsers: Firefox: 147.0.4 - C:\Program Files\Mozilla Firefox\firefox.exe npmPackages: @sveltejs/vite-plugin-svelte: ^7.2.0 => 7.2.0 svelte: ^5.0.0 => 5.56.8 vite: ^8.2.1 => 8.2.1