-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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 not working in class components #9302
Comments
I have this issue as well, I managed to reproduce it pretty easely:
I have confirmed the above to be the case on both SPA and SSR. quasar: v2.0.1 |
Here is a repo with the code created from the steps above: https://github.com/Evertvdw/quasar-v2-hmr-bug |
I looked at the issue and it is not really clear what is happening. I can see that it is triggering the HMR pass and our auto-loader webpack plugin is triggered, but it does not trigger the vue component rerender. It definitely appears to be related to our auto-import loader, but the loader is generating the exact same code for the initial load as it does for the HMR pass. I don't have time to dive into the details of it but it must be related to the internals of how vue is detecting what parts of the page should be rerended as part of the HMR reload. I will try to reach out to the Vue team and see if they have any guidance. I will post any updates here as I have them. |
I would like to add my +1 to this issue. |
Just spent some hours trying to debug this further. I tried multiple things comparing a Class API and a Composition API project
At this point, the problem could be either in Vue (eg into vue-loader or vue-compiler), into the Class Component library or in webpack dev server directly I asked advice to the Vue team on this, let's see if they have any suggestion on how to debug it further |
I've tried this and it works for me (quasar 2.0.4):
|
@r3gisc thanks for sharing! |
I see... I got in touch with Vue Team in relation to the vue-loader issue, but they are clueless |
We are closing this as this is most likely not a Quasar issue. Either Webpack or vue-loader is misbehaving and there's nothing that we can do about it. We'll try to comment here about their investigation. Feel free to also do this. |
Found the culprit in vue-loader. It doesn't registers the __hmrId correctly on class components. |
Submitted the PR: vuejs/vue-loader#1897 |
Hey, Good day
I detect a problem with HMR in components with class style. The HMR not working when we use the quasar components that auto imported in components with class style.
I spent a long time, to detect the problem. And I realized that the combination of Vue3 + Class Style Component + Using auto imported Quasar Component causes the problem.
The text was updated successfully, but these errors were encountered: