Closed rbutera closed 3 months ago
Start a new pull request in StackBlitz Codeflow.
Nevermind. Turns out it was Adguard filtering out loopback connections in localhost.
In adguard settings, go to advanced settings and then disable Filter localhost
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