Skip to content

hmr error #1021

Closed
vuejs/core
#2567
Closed
@anncwb

Description

Describe the bug

A very strange problem. When I trigger a hot update, the console will report an error. But I don't understand where the problem is。

This problem will cause the entire page to crash and can only be solved by refreshing the page

After the project is large, the problem will appear almost every time a hot update is triggered. Seriously affect development

Reproduction

https://github.com/anncwb/vite-hmr-error-repo

  1. clone repo
  2. yarn install and yarn dev
  3. Open the browser console
  4. Comment code src/Comp.vue
           <!-- <img alt="Vue logo" src="/@/assets/logo.png" /> -->
  5. Save to trigger hmr
  6. view the browser console

image

In this example, it is normal to comment the following code, but I don’t know how to do it for other projects?. This is a problem with vue or a component library.

Comment code works normally

    <!-- <a-col :md="24" :lg="17">

    </a-col> -->

System Info

  • required vite version:rc.9
  • required Operating System:mac
  • required Node version:12

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions