You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This issue occurs in any fresh vite app (npm create vite@latest) on Windows Subsystem for Linux 2.
If I update the file _index.tsx, I get the following output in terminal:
13:57:46 [vite] hmr update /src/App.tsx
Interestingly, in the browser console, I CAN(!) see the following message:
[vite] hot updated: /src/App.tsx
However is no change to the browser contents at all. If I refresh the page manually then the changes are propagated as expected.
There is no error message in the browser console.
Out of curiosity, I have checked the Next.js dev server which works as expected.
I have tested the exact same repo on MacOS (same node.js version) and HMR works as expected in that environment.
I have tried setting server.hmr.host to both 127.0.0.1 and localhost in vite.config.ts but this does not fix the problem. usePolling also has no effect, I suspect because a file change IS detected.
Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
Make sure this is a Vite issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to vuejs/core instead.
Describe the bug
This issue occurs in any fresh vite app (
npm create vite@latest
) on Windows Subsystem for Linux 2.If I update the file
_index.tsx
, I get the following output in terminal:13:57:46 [vite] hmr update /src/App.tsx
Interestingly, in the browser console, I CAN(!) see the following message:
[vite] hot updated: /src/App.tsx
However is no change to the browser contents at all. If I refresh the page manually then the changes are propagated as expected.
There is no error message in the browser console.
Out of curiosity, I have checked the Next.js dev server which works as expected.
I have tested the exact same repo on MacOS (same node.js version) and HMR works as expected in that environment.
I have tried setting
server.hmr.host
to both127.0.0.1
andlocalhost
invite.config.ts
but this does not fix the problem.usePolling
also has no effect, I suspect because a file change IS detected.Related Issues
Issue #5878
Please note this is not a duplicate of #5878 despite the same title. The project is NOT in the windows filesystem, it is in the linux filesystem.
Issue #12142
The response by @sapphi-red in #12142 is also not relevant. Vite detects a file change.
Reproduction
https://stackblitz.com/edit/vitejs-vite-yfza6z?file=index.html
Steps to reproduce
use wsl2
System Info
Used Package Manager
pnpm
Logs
No response
Validations
The text was updated successfully, but these errors were encountered: