Skip to content

undef error in <script setup> breaks HMR #5

Open
@abitwhy

Description

@abitwhy

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

https://vite.new/vue

Reproduce Steps

  1. Open a new Vite-Vue project (click the reproduction link above)
  2. Open src/App.vue
  3. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions