Open
Description
Describe the bug
Any undef
error in the <script setup>
will break the HMR. If auto save file is on, then entering any incomplete code will cause an error and break the HMR.
Break means it no longer working, even if correct the code. And only fresh the page will make HMR work.
This happened only recently, and only happened in <script setup>
.
Reproduction
Reproduce Steps
- Open a new Vite-Vue project (click the reproduction link above)
- Open
src/App.vue
- Write an
undef
error in<script setup>
(For example, write some characters in a new line)
System Info
N/A
Used Package Manager
npm
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 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.