-
-
Notifications
You must be signed in to change notification settings - Fork 8k
Vite HMR bug when serving only HTML #7836
Copy link
Copy link
Closed
Labels
feat: hmrp2-edge-caseBug, but has workaround or limited in scope (priority)Bug, but has workaround or limited in scope (priority)regressionThe issue only appears after a new releaseThe issue only appears after a new release
Description
Describe the bug
When using Vite with only an HTML file, changing the code creates an HMR request but this doesn't update the HTML.
This worked in vite@2.9.0-beta.0 but stopped working in vite@2.9.0-beta.1
Here's a repro showing the regression: https://github.com/leonzalion/vite-hmr-bug
And a video:
bug.mp4
Reproduction
https://stackblitz.com/edit/vitejs-vite-vmzqtg?file=index.html&terminal=dev
System Info
System:
OS: macOS 11.6.4
CPU: (16) x64 Intel(R) Core(TM) i9-9900K CPU @ 3.60GHz
Memory: 37.89 GB / 64.00 GB
Shell: 5.8 - /bin/zsh
Binaries:
Node: 17.8.0 - ~/Library/pnpm/node
Yarn: 1.22.17 - /usr/local/bin/yarn
npm: 8.5.5 - ~/Library/pnpm/npm
Browsers:
Brave Browser: 100.1.37.114
Chrome: 100.0.4896.127
Firefox: 99.0
Safari: 15.3Used Package Manager
pnpm
Logs
No response
Validations
- Follow our Code of Conduct
- Read the Contributing Guidelines.
- Read the docs.
- 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 https://github.com/vuejs/core instead.
- Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
- The provided reproduction is a minimal reproducible example of the bug.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
feat: hmrp2-edge-caseBug, but has workaround or limited in scope (priority)Bug, but has workaround or limited in scope (priority)regressionThe issue only appears after a new releaseThe issue only appears after a new release