Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hmr error #1021

Closed
anncwb opened this issue Nov 5, 2020 · 1 comment · Fixed by vuejs/core#2567
Closed

hmr error #1021

anncwb opened this issue Nov 5, 2020 · 1 comment · Fixed by vuejs/core#2567

Comments

@anncwb
Copy link
Contributor

anncwb commented Nov 5, 2020

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
@underfin
Copy link
Member

underfin commented Nov 6, 2020

It caused by the ARow component triggered setter inside render function and added their update effect into queue, but it will be null after run invalidateJob when them actually updated.

the ARow component triggered setter inside render function

Code is here https://github.com/vueComponent/ant-design-vue/blob/next/components/grid/Row.tsx#L121

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants