vite-plugin-vue
vite-plugin-vue copied to clipboard
The value is undefined after hot update
Describe the bug
After making random changes in this file, hot update can no longer get the viewer value;
Finally, it was found that the router in http affected him;

Reproduction
https://github.com/an501920078/bugDemo.git
Steps to reproduce
pnpm i pnpm run dev Edit initHomeView.ts save
System Info
System:
OS: Windows 10 10.0.22621
CPU: (12) x64 Intel(R) Core(TM) i7-10750H CPU @ 2.60GHz
Memory: 4.15 GB / 15.84 GB
Binaries:
Node: 16.16.0 - D:\nodenvm\nodejs\node.EXE
npm: 9.1.3 - D:\nodenvm\nodejs\npm.CMD
Browsers:
Edge: Spartan (44.22621.900.0), Chromium (108.0.1462.46)
Internet Explorer: 11.0.22621.1
npmPackages:
@vitejs/plugin-vue: ^4.0.0 => 4.0.0
@vitejs/plugin-vue-jsx: ^3.0.0 => 3.0.0
vite: ^4.0.0 => 4.0.0
Used Package Manager
pnpm
Logs
No response
Validations
- [X] Follow our Code of Conduct
- [X] Read the Contributing Guidelines.
- [X] Read the docs.
- [X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- [X] 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.
- [X] Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
- [X] The provided reproduction is a minimal reproducible example of the bug.
Has anyone solved this problem?